Altruistic suicide

Altruistic suicide is suicide committed for the benefit of others. Falling on a grenade is one such example. Émile Durkheim notes that tribal people sometimes see it as their duty to commit suicide, as when a wife kills herself after her husband dies, or a man kills himself in old age; but Durkheim also observes that altruistic suicide is unlikely to occur much in modern western society where “individual personality is increasingly freed from the collective personality.” Altruistic suicide has been described as an evolutionarily stable strategy. Altruistic suicide has a long history in India, even being noted in the Dharmashastras. Some perceive self-immolation as an altruistic or "worthy" suicide.

Cultural references
In the 1982 film Star Trek II: The Wrath of Khan, the character Spock commits an altruistic suicide when he takes a lethal dose of radiation poisoning in order to make repairs so that the starship USS Enterprise can escape destruction.