I have found the discussion by Stephan Batchelor in Buddhism without beliefs to be quite usefull. I discovered this section in his book a few years before I was diagnosed with terminal cancer and was able to use the insight I gained from it to great effect.
As Batchelor points out death can be discussed not as a morbid topic but as a life affirming event which can be a life transition from which we can learn from and grow.
Here is what he says: " Since death alone is certain, and the time of death is uncertain, what shall I do?"
"This is not a proposition to be answered in a reactive manner but one to be contemplated in a purposeful, prolonged and thoughtful way"
The idea presented here is that since we do not know when and how often we will be confronted with death we have to prepare ourselves.
let's start with the first phrase--
1. If death alone is certain...
Batchelor asks us to think of the beginnings of life on earth around 3.5 billion years ago--this is when the first carbon based life, prokaryotes came into being.
And he asks us to then follow that thinking to the emergence of multi-cellular life, fish, amphibians, mammals, to the appearance of the first of our immediate ancestors [hominins]about 5 million years ago and finally to the homo sapiens sapiens of the present day: us.
Each of these beings was born and each died
Contemplate this for a few moments
What distinguishes you or I from any one of them?
Life is a delicate balance... depending on the functioning of vital organs, but...can we not feel it changing "with each pulse of blood, slipping away with each breath....the loss of hair, pain in the joints, wrinkling of the skin."
When I was 10, I was sitting next to a small rivulet, an over flow of Donner Lake, near Lake Tahoe, where my uncle had just built a cabin. i was just playing with little sticks floating in a stream
In one instant I had a deep epiphany. I thought of the millions of years of evolution that had passed and saw in that instant the total unity of all life and existence on this planet.
It felt to me as if the dinosaurs and other ancient, long-gone creatures were walking through the trees and swimming in the lake. right then and there I felt a deep kinship with the continuity of life on the planet. It was an extremely powerful moment and I have a vivid memory of it to this day.
And I suspect that this event had some kind of major influence on how I have seen the world in my life since then.
all of these creatures are dead, but their death gave rise to more life and the continuty of such to the present day.
2. ...and the time of death uncertain
"Though statistics assure us a chance to live to an "average" age, there is no guarantee that we will live another minute, or to next week, or next year, or many years from now"
Death does not just happen to only others, nor when we want it to.--to think otherwise is to maintain the fantasies of a child.
Life is fragile, our bodies are fragile. Just "a bag of flesh, bones and blood."
"Life depends on the pumping of a muscle"
Anything can happen: each time we cross a road, descend a flight of stairs, our lives are at risk.
When I was four I was both hit by a car and dragged and swept out into the San Francisco Bay by a riptide in the Carquinez Straits, saved only by a quick response from a relative.
When I was seven I was within inches of falling from a hundred foot cliff into the Pacific Ocean.
When I was in my thirties, the car I was in did a 360 in a downpour on I-5 in Portland, Ore.
Any of these and more could easily have resulted in my death.
As Batchelor said, "life is accident prone."
3. ...what should I do?
"What am I here for? Am I living in such a way that I can die without regrets? How much of what I do is compromise? Do I keep postponing what I "really" want to do until conditions are more favorable?"
"Asking such questions interrupts indulgence in the comforts of routine and shatters illusions about a cherished sense of self-importance."
Asking such questions humbles us
"..It requires that I examine my attachments to physical health, my attachments to financial independence,
my attachment even to loving friends.
"For they are easily lost. I cannot ultimately rely on them. Is there anything then that I CAN depend on?"
"It might be that all I can trust in the end is my integrity to keep asking such questions as: Since death alone is certain, and the time of death is uncertain, what shall I do? And then to act on them."
This koan, if I may call it that, is not meant to be answered on the spot. For such an answer to the question "what shall I do" usually brings a similar response from people: "LIVE"
But this is not the answer, this is a cognitive response on the cerebral level.
The answer, if there is one, comes from a long period of dedicated time in the kind of deep meditation that puts us in contact with the knowledge that we are not separate from the rest of our world or even existence itself, but an integral part of it.
And that knowledge is not just a thought that one might have, but rather a profound sense of the nature of our reality and death and what an understanding of that nature can have for how we live our lives.