Memento mori — invitations to reflect on our own mortality — have been common throughout history. Two ancient traditions that made reflection on death central to their paths are Buddhism and Stoicism. For both, the starting point is the fact that our normal perceptions of value are deeply flawed, as we are constantly craving or loathing things that in reality are unimportant. The Buddhist texts offer a neat list of these: gain and loss, fame and disrepute, praise and blame, pleasure and pain. The Stoics had a word for them, which translates as "indifferents." The things that we are so keen to pursue — wealth, material possessions, sense pleasures, comfort, success, people's approval, romantic love and so on — are bound to disappoint and distract us from what really matters, which is our ethical and spiritual progress.

But arguing that we shouldn't spend our lives seeking those things is not enough. The urges are strong and engrained in us, and both traditions knew it takes more than reason to begin to shake them. It takes sustained reflection on vivid and even shocking imagery to make the point on a more visceral level. This is where death meditations come in.

One of the most striking examples of this is the meditation on corpses presented in the Buddhist Satipatthana Sutta. In ancient India, corpses were left out in "charnel grounds," and people would have had the opportunity to observe the various stages of decomposition. The text is nothing if not thorough, describing in some detail "a corpse thrown aside in a charnel ground — one, two, or three days dead, bloated, livid, and oozing matter … being devoured by crows, hawks, vultures, dogs, jackals, or various kinds of worms," eventually turning into "bones rotten and crumbling to dust." On observing this, the monk reminds himself that "this body too is of the same nature, it will be like that, it is not exempt from that fate."

Reminders of death are everywhere in the Stoic literature, albeit generally less graphic. The nearest the Stoics come to such detailed descriptions is with the Meditations of Marcus Aurelius: "Bear in mind that everything that exists is already fraying at the edges, and in transition, subject to fragmentation and to rot. Or that everything was born to die." He is also concise and to the point in his assessment of human life, which is "brief and trivial. Yesterday a blob of semen; tomorrow embalming fluid, ash."

Epictetus advises to keep death always at the front of our minds: "Day by day you must keep before your eyes death and exile, and everything that seems terrible, but death above all; and then you will never have any abject thought, or desire anything beyond due measure."

These reflections are meant to alert us to the fact that the things we find attractive and desirable are "shiny on the outside, but on the inside are pitiful," as Seneca put it. Practices that instigate detachment from the things of the world are a preparation for death in the sense that the recognition that they are not important should make it easier to accept that soon enough we will not be around to enjoy them.

The ancients knew that such practices should be handled with care. Their intention was to elicit equanimity, not aversion. The Buddha warns that if a meditation of this kind were to evoke loathing, the monk should switch to a different one. To illustrate this, one discourse reports the case of a group of monks who engage so enthusiastically with contemplating the unattractiveness of the body that a number of them end up killing themselves. On finding out what happened, the Buddha decides to teach the survivors the more soothing practice of mindfulness instead.

As the Buddha advised, we need to be alert to the possibility that death meditation could be detrimental if we overdo it, or do it in the wrong spirit or state of mind. But why do it at all, if we're not Buddhists or Stoics? Not everyone is convinced that preparing for death is a good idea. In On Physiognomy (1580), Michel de Montaigne muses that it's a bit like putting on a fur coat in summer because we'll need it at Christmas: "It is certain that most preparations for death have caused more torment than undergoing it." Why weigh ourselves down with thoughts of our demise when we can choose to enjoy life and leave the end to take care of itself?

While that is an appealing perspective, there are reasons to keep mortality towards the front of our minds. According to the existential psychotherapist Irvin Yalom's Staring at the Sun (2008), the fear of death is with us all the time, whether we realize it or not. Even if we are not racked with it, death anxiety sneaks into our life in many disguises. It is what causes us to distract ourselves through the pursuit of wealth and status, for instance, or seek comfort through merging with another, or a cause. But such denial "always exacts a price — narrowing our inner life, blurring our vision, blunting our rationality. Ultimately self-deception catches up with us."

Sometimes, we are shaken out of our denial by a great crisis, such as terminal illness or bereavement, or by another significant life event. Unexpectedly, Yalom argues, such experiences can evoke a sense of awakening, leading to a dropping away of trivial concerns, to reprioritizing what matters in life and a heightened perception of the beauty around us: "[T]hough the physicality of death destroys us, the idea of death saves us."

But we needn't wait for pivotal experiences, says Yalom. By confronting our finitude through therapy, or reflection on death, a lasting shift in perception can arise. Yes, the process might evoke some anxiety, but ultimately it is worth it, as it can make our life richer and more vibrant.

By highlighting the fact that time is short, death meditation can help us to put things in perspective and appreciate the present more. It can remind us that the things we get so worked up about are not worth it — our appearance, career, how our achievements compare with those of our peers, the satisfaction of material desires, disputes with neighbors and tradespeople. Marcus Aurelius draws out this aspect of it well: "Think of the list of people who had to be pried away from life. What did they gain by dying old? In the end, they all sleep six feet under."

Death can happen at any time, as Seneca is fond of reminding us: "There's no way to know the point where death lies waiting for you, so you must wait for death at every point." But this thought need not lead us to brood on the unsatisfactory quality of the human condition. Instead, it can open the way to a deep acceptance of it, together with the awareness that we had better make the most of what we have here and now. This is no glib hedonism, but a bittersweet recognition that any joy in life is always and necessarily intermingled with death and transience.

This article was originally published by Aeon, a digital magazine for ideas and culture. Follow them on Twitter at @aeonmag.