Pidyon shevuyim, redeeming captives, can be traced all the way back to Abraham (Genesis 14). When he learned that his nephew Lot had been captured by soldiers who attacked Sodom, he gathered over 300 people and pursued the opposing army. Shortly thereafter, Abraham and his men defeated the invaders and rescued Lot, along with others who were being held hostage. The significance of redeeming captives is also alluded to in the first of the Ten Commandments. God begins by saying, "I am the Lord your God Who brought you out of the land of Egypt, the house of bondage" (Exodus 20:2). Rabbenu Bachya comments that God could have simply referred to Himself as the "Creator of heaven and earth," but wanted to mention the importance of redeeming captives - in this case, 600,000 Jews - which is considered even greater than the wonder of Creation.
Given the importance of this mitzvah, and the ramifications of action or inaction, there are different philosophical approaches when it comes to pidyon shevuyim. Among them are redeeming captives under any circumstances and redeeming captives only when the price is reasonable. These conflicting factors continue to haunt Israeli officials and citizens alike. On the one hand, no soldier can be left behind. On the other hand, at what price can a deal be negotiated (which would likely include the release of convicted terrorists) without putting more people in jeopardy?
From a moral and halachic perspective, both sides of this issue have legitimate arguments. Unfortunately, there is no easy answer to this dilemma. As is often the case in life, the choice is not between good and bad, but between bad and worse. While we must continue to do our best to affect Gilad's release, his redemption is ultimately in God's hands. To add to Rabbenu Bachya's analysis, not only is redeeming captives considered greater than Creation itself, it also appears to be just as remarkable to accomplish.
One thing we can do as a larger Jewish family is control how we treat one another. If nothing else, we can help Gilad in that sense. Instead of simply feeling sorry for his predicament, we can create an immeasurable spiritual merit on his behalf through our behavior. In this way, Gilad will not just be passively suffering at the hands of terrorists; he will be actively helping the entire Jewish world. He's going through torment beyond what any of us can imagine. Our daily interactions with difficult people pale in comparison. In the scheme of things, is it really worth it to act condescendingly towards - or outright defame - another Jew? If all else fails in preventing indecent interpersonal behavior, think of Gilad.
You'd be amazed by what you can accomplish when you put aside your ego and sincerely care about the welfare of someone else.