Sallekhana(santhara) is a practice in Jainism, where after discharging ones duties in life, one stops being a consumer and goes into deep meditation until death. You may call it total voluntary retirement from consumerism in favour of spiritualism. It is akin to euthanasia in terms of the final result but not in methodology or philosophy.
The very core idea behind Hinduism, Jainism and Buddhism is that the soul is part of God which never dies but keeps changing body by virtue of repeated births (role palying) and this material world is just an illusion. Influenced by this core idea, the philosophy behind santhara is to get ready for the life after successfully completing the present term. It is like preparing soul for the next level. The idea is not to kill self but self realization, in which the soul finally overcomes bodily senses and worldly illusion. Its a celebration to usher a new beginning in quest for the truth.