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!
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.
We quaff the cup of life with eager haste without draining it, instead of which it only overflows the brim - objects press around us, filling the mind with the throng of desires that wait upon them, so that we have no room for the thoughts of death.
To my mind, there are two things that, in life, you can do about death. Either you can choose to ignore it, in which case you may have some success in making the idea of it go away for a limited period of time, or you can confront the prospect of your own death and try to analyze it and, in so doing, try to minimize some of the inevitable suffering that it causes. Neither way can you actually overcome it.