In the case of Christ, as the Son of God, and as God incarnate, dying did not amount to failure. No spiritual text is to be taken verbatim or literally, what is important is the underlying spiritual context which is roughly the same across all faiths.
Christ died because people around Him could not accept this underlying spirituality, felt that it threatened everything that they had come to know, and had to do something about it. Messengers/Prophets of God will always face persecution. Not necessarily because they are phonies but because they offer and live such a revolutionary life by the context of their teachings.
Christ had no choice but to die. From the moment he took up His post, it was ingrained upon His being.
Look at the events surrounding Tahirih: the Persian Babi martyr, poet, and women's emancipationist. At the Babi council of Badasht, everyone was arguing about whether or not the Babi Faith was an independent religion or just another sect of Islam. Tahirih knew the answer, and also the power of symbolism. She entered the men's meeting room and removed her veil. This caused some Babis to leave the Faith forever and one man to attempt suicide by cutting his own throat.
Tahirih was imprisoned by her father and her husband, then later by the government. When she left to travel and teach the Faith, she had to leave her children behind, never to see them again. She was martyred in her early 30s. Strangled by her own silk scarf and buried in a well. The last words she spoke were "You can kill me as soon as you like, but you cannot stop the emancipation of women."
That was in 1852.
Martyrdom cannot be compared to dying for one's country. To die a martyr is to die in service to the Highest Cause. As opposed to dying for the material hungers of mere men.
_________________
"Honest disagreement is often a good sign of progress."
"Freedom is not worth having if it does not include the freedom to make mistakes."
-Mahatma Gandhi