Her lips were red, her looks were free, Her locks were yellow as gold: Her skin was white as leprosy, The Nightmare Life-in-Death was she, Who thicks man's blood with cold.
We cannot hope to die peacefully if our lives have been full of violence, or if our minds have mostly been agitated by emotions like anger, attachment, or fear. So if we wish to die well, we must learn how to live well: Hoping for a peaceful death, we must cultivate peace in our mind, and in our way of life.
To perceive that form reveals the void, and to see that the void reveals form, is the secret for the overcoming of death. To the extent that one is unaware of space, one is unaware of one's own eternity — it's the same thing!