When you realize where you come from, you naturally become tolerant, amused, kindhearted as a grandmother, and dignified as a king. Immersed in wonder, you can deal with whatever life brings you, and when death comes, you are ready.
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.
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.
Nothing retains its form; new shapes from old. Nature, the great inventor, ceaselessly contrives. In all creation, be assured, there is no death - no death, but only change and innovation; what we men call birth is but a different new beginning; death is but to cease to be the same. Perhaps this may have moved to that, and that to this, yet still the sum of things remains the same.
There are flood and drought over the eyes and in the mouth, dead water and dead sand contending for the upper hand. The parched eviscerate soil gapes at the vanity of toil, laughs without mirth. This is the death of the earth.
Oft, as in airy rings they skim the heath, The clamtrous lapwings feel the leaden death; Oft, as the mounting larks their notes prepare They fall, and leave their little lives in air.