Svecchāmṛtyu

Svecchāmṛtyu (स्वेच्छामृत्यु), also called Icchāmṛtyu (इच्छामृत्यु) is a Sanskrit concept in Hinduism meaning "self-willed death". In Hindu mythology, a number of beings gain the boon of svecchāmṛtyu in reward for their actions, allowing them to choose their time and manner of death.

Hinduism
In the Mahabharata, King Shantanu is stated to have granted the boon of svecchāmṛtyu to his son Bhishma for his selflessness, allowing him to choose the time and manner of his own death.

Indra is stated to have granted Hanuman svecchāmṛtyu in acknowledgement of the deity's resilience after surviving the attack of his thunderbolt.

Tantrism
The Svadhishthana Chakra is the abode of the tattva apas; one conquers death with the awakening of this chakra. As one of the twenty-six siddhis that form part of Kundalini yoga, icchāmṛtyu siddhi gives the yogi the power to die at will. According to Aurobindo, the sadhaka of Integral yoga aims at complete liberation from all attacks of illness, and the power to prolong life at will – icchāmṛtyu.

In popular culture
According to popular belief, in the course of his visit to Amarnath cave, Swami Vivekananda is regarded to have had the vision of Shiva in the cave and was blessed with the boon of death-at-will (iccha-mrityu). He had predicted that he would not live forty years, he did not.

Acquaintances of Mahatma Sisir Kumar and Pandit Dinabandhu Vedantaratna also attest to the fact that they have willed their own death.