Q: Suppose you know you’re going to die in three minutes. How do you train your mind at that point?
A: The first point of advice is: Don’t wait until you’re two or three minutes from death. Try to practice in advance as much as you can. But if you suddenly realize that death is imminent, remember that you really have to let go. Of everything.
The Buddha’s advice is that if you’re worried about what you’re leaving behind, the first order of business is to get rid of all worries. You have to drop all worries about your family or any unfinished business in this world, because as the Buddha said, even if you’re worried about these things, at this point you can’t help them. So, one, don’t worry about things you’re leaving behind.
Then, two, if you’re concerned about leaving behind human sensual pleasures, remember that the pleasures of heaven are better than human pleasures.
There’s one discourse, a sutta, where the Buddha recommends telling a person on his or her deathbed about the pleasures of each level of heaven, saying that each one as you go up is better than the lower one, so set your mind on the higher one rather than the lower one. But then the Buddha recommended telling the person that even the devas in the higher levels still suffer from a sense of self-identification. In other words, there’s a sense of clinging to their idea of who they are. A greater wellbeing would be to let go of any sense of self-identity entirely.
Now, if you only have two or three minutes, you can skip all of those levels of heaven and just remind yourself: “Anything that comes up in the mind is not me, not mine. Let it go, let it go, let it go.” And remember that your awareness will outlast anything else that comes up: thoughts, pains, visions of this place or that, this person or that. So stay with that awareness.
Then, if you can get away from those concerns, try to do away with any sense of self around that awareness. If you can learn how not to identify with any sense of self around that awareness, then awakening is possible at the moment of death.
This reflection by Ajaan Geoff is from the book, The Karma of Mindfulness : The Buddha’s Teachings on Sati and Kamma, (pdf) pp.94-95.