Suta told the sages that a person who wants to control death should first be seated on a pure seat. He should then perform Pranayama by holding his breath. While doing this exercise care should be taken that lamp is not burning. Both the ears should be shut by the index fingers for the period of one hour. After doing this he would be able to hear the sounds emerging from within. He should try to concentrate his mind on that sound.
If this exercise is practiced daily for two hours, then he will have full control over his death. This particular exercise helps a man to attain great accomplishments, self-knowledge and salvation."
Source: Shiva Mahapurana Book Five Uma Samita