Last spring, at Green-Wood cemetery in Brooklyn, where the artist Jean-Michel Basquiat is buried, another conceptual artist, Sophie Calle, launched an installation called Here Lie the Secrets of the Visitors of Green-Wood Cemetery. For the next 25 years, anyone passing by will be able to write down their most intimate secrets and bury them in a grave designed by the artist. The cemetery also hosts moonlit tours, cocktail parties, dance performances, and even yoga classes.

Death is hot right now, and upbeat gatherings in cemeteries are just a small part of the trend. One of the chief desires of our time is to turn everything we touch into a reflection of who we are, how we live, and how we want others to view us — and death is no exception. Once merely the inevitable, death has become a new bourgeois rite of passage that, much like weddings or births, must now be minutely planned and personalized.

If you fancy an environmentally friendly burial, you can choose to be wrapped in a biodegradable artisanal shroud, decorated to your specifications by the bespoke company Vale for $545. (It's just $68 for pets.) Or you can be buried, as the celebrated California chef Alice Waters says she wants to be, in a burial pajama suit seeded with mushrooms that help your body decompose more quickly.

For people more worried about the terrifying prospect of dying alone, there are now solutions. You can hire a death doula, a trained professional who will assist at the end of life in the same catchall manner that birth doulas are there during labor. You can request a home funeral, in which your friends and family pay their respects to your corpse in the comfort of your living room. And before that day arrives, you can discuss the facts of death with like-minded souls at a Death Cafe, a meeting of the global movement started in 2011 by Jon Underwood (who died last summer of acute promyelocytic leukemia) as a way for people to gather and reflect on mortality.

One of the people pioneering this new way of approaching death is Caitlin Doughty, a young, Los Angeles–based mortician who looks like a lost member of the Addams Family. She has written a best-selling memoir, hosts a YouTube series called "Ask a Mortician," and has founded a "death acceptance collective" called The Order of the Good Death, whose youthful members promote positive approaches to mortality.

"It's okay to be openly interested in death practices," Doughty told me while driving through L.A. one afternoon last autumn. "It makes you an engaged human who cares about all aspects of life."

This growing interest in alternative "death practices" began as a way to skirt the commercialism and uniformity of the funeral industry. And it appeals to a diverse set of people. "This desire for a pine box in the ground brings together hippies and libertarians, stay-off-my-land gun owners, certain religious people, Trump voters who don't want Big Business ignoring what they want," Doughty said. "They might not all have the same back-to-the-earth vision, but it's the same fight for their fundamental rights. They don't want a bland corporate infrastructure to dictate what happens to their mortal remains and what represents their life."

Given that the idea of rethinking death connects with millions of people who are tired of the rampant commercialism and homogeneity of modern life, it was only a matter of time before commercial interests caught on. Just as the Danish concept of hygge was sold — in the form of scented candles and hand-knitted woolen socks — to consumers looking for comfort in troubled times, there is gold, too, in our obsession with a good death.

Publishers, in particular, have latched on to the trend. Last year saw the arrival of a stack of literary memoirs about death by authors such as Edwidge Danticat and Robert McCrum. In his memoir, My Father's Wake, the writer Kevin Toolis explains why the Irish get death right, while Caitlin Doughty's new book, From Here to Eternity: Traveling the World to Find the Good Death, explores the way cultures from Indonesia to Bolivia to Japan approach death.

But perhaps it is not the Irish or the Bolivians who have perfected the art of dying well, but the Swedish. In recent months, thanks to a publisher-led media campaign, you may have come across the concept of döstädning, the Swedish practice of "death cleaning." Death cleaning applies a simple formula to the process of dealing with our possessions before we die. In Marie Kondo's The Life-Changing Magic of Tidying, a best-selling guide to tidying up your home, and thus your life, the essential question is whether a given object "sparks joy." In death cleaning, it is "Will anyone I know be happier if I save this?"

It is easy to see the appeal. Death cleaning addresses many of the aspects of contemporary life that make us most anxious. For those who feel that they have accumulated too much stuff and that all this stuff is getting in the way of their spiritual development, it offers a practical guide to decluttering. For those who worry about their privacy or the prospect of relatives discovering their secrets, it offers sensible precautions. For those who fear a long, bewildered, incapacitated old age, it is a way of coping through clear-eyed preparation and understanding.

A friend of mine who works as a radio producer in Stockholm said, "My mother is döstädning incarnated. She has been in the mode of frenetic cleaning for a couple of years now — she is 65 — [and thinks] throwing stuff out will make it easier for us children when she is no longer with us. She doesn't want us to be left with difficult decisions about what to do with it and she doesn't want personal stuff to get in the wrong hands."

The well-funded Swedish welfare state enables elderly Swedes to live independently. "Perhaps this also adds to the sense that they feel they must get their things in order before they die, so that no one else should be responsible for it," says Michael Booth, author of The Almost Nearly Perfect People, a cultural tour of Scandinavian countries.

The book responsible for spreading the death-cleaning gospel is by Margareta Magnusson, a Swedish artist who describes herself as between "80 and 100." The Gentle Art of Swedish Death Cleaning: How to Free Yourself and Your Family From a Lifetime of Clutter came out in English a few months ago. It is part practical guide to getting your affairs in order, part discourse on accepting the reality of death. Over the course of 38 very short chapters with titles such as "If It Was Your Secret, Then Keep It That Way" (or "How to Death Clean Hidden, Dangerous and Secret Things"), Magnusson sets out her pragmatic and upbeat approach to mortality. "Life will become more pleasant and comfortable if we get rid of some of the abundance," she writes.

"The message was, We just have to accept that one day we will die," said her literary agent, Susanna Lea. "Either our loved ones will begrudge us, or they will hold on to this wonderful memory and love us for sorting everything out. Which one do you want?"

As soon as Lea sent the book proposal out, publishers eagerly snapped it up. A German editor made an offer after just four hours. Lea took it to the 2016 Frankfurt book fair, the marketplace for international sales, and sold it to the U.K., U.S., and Australia. It is now being translated into 23 languages.

Magnusson lives in an apartment in a large development in the Södermalm neighborhood of Stockholm. She's tall and slender, wearing a striped French sailor-style shirt, faded jeans, and trainers, with a gray bob and a long, oval-shaped face. Her most striking feature is her large, round, wet blue eyes. She looks healthy and spry and fashionable without trying hard, which fits the image of her as a mellow, slightly kooky, but wise Scandinavian grandma who writes things such as "Maybe Grandfather had ladies' underwear in his drawer and maybe Grandma had a dildo in hers. But what does that matter now? They are no longer among us; if we liked them, it really should be nothing for us to worry about."

The first thing to note about Magnusson's home is that it is not in any way minimalist. In her living room there are shelves of hundreds of books, and gentle abstract paintings by Magnusson herself on the walls. There are a surprising number of stuffed toys and masks from Asia (her late husband was Swedish but born in Japan, and the family lived in Singapore and Hong Kong as he moved frequently for work), presumably all of which have passed the making-people-happy test. The flat is packed with objects of sentimental value that have accrued around an elderly person who once lived in a larger home. It's all cheerful and very, very neat.

She has a large collage of family photos hanging in her bedroom: a sister and brother, who are both dead, and her husband, who died in his mid-70s. Her book suggests that sorting through photographs is not the place to begin your death-cleaning process — too many memories to get swept up in and too much sentiment. Better to start with the kitchen. But when it's time to declutter your photos, she advises, be ruthless. One of her points is that if you don't know the names of the people in a photo, feed it to a shredder.

Isn't all decluttering about death? I asked Caitlin Doughty, the mortician. "It is a little death to give away a keepsake or an item," she agreed. "For most people to admit that they should be keeping track of stuff and getting rid of things is extremely threatening to their sense of self and idea as mortal."

For many of us, the main way we try to look at death is by not looking at it. My own parents constantly talk about how they want their dead bodies to be dealt with — my mother has gone from wanting her cremains to be flushed down the toilet to wanting her corpse fed to dogs — and yet the elaborate plans for death are a way around dealing with it. My father won't even write a will, instead preferring to phone me at odd hours to get me to make solemn promises that, after he is gone, I will do or will not do certain things (such as keeping his house in the family or making sure to invite specific people to his funeral).

This highly developed awareness of their own mortality and careful consideration of how to dispose of their remains, combined with a total lack of planning for what happens after the funeral, sometimes feels like my parents' way of ensuring that their large personalities will gently haunt me from the afterlife. Or, to put it more politely, it seems like a way to guarantee their presence in my life as long as possible.

But I also sympathize with them. Both of my parents are 66 and will hopefully be around for some time. Dealing with one's own legacy is a stark business. It involves accepting that you are the one who cares most — or perhaps the only person who cares at all — about your own legacy. At the same time, it means confronting hard questions about the people you will leave behind. Will your last gift to your loved ones be to leave them a few valuable possessions, or a photo album full of memories, or simply the great favor of not burdening them with having to sort through all the stuff you accumulated over your lifetime?

The idea of death as a solo journey is redolent of the language of wellness: the way people talk about getting into their fitness or diet or mindfulness routines. This new view of death borrows heavily from another trendy concept: self-care, the idea that looking after oneself is a political act, shoring yourself up to be able to keep fighting and facing the world. Self-care, too, has been co-opted to be about treating yourself to bath products, massages, face masks, and yoga retreats — granting yourself an excuse to make it okay to buy stuff. The commercialization of death is the inevitable sequel to the monetization of every other part of life.

Death cleaning is possibly more potent than other well-being trends in that it taps into deep emotions: fear, guilt, regret. The death industry exploits people's fears of inadequacy. You can't just die — at the very least, you'll need to invest in a house-tidying consultant, a death doula, even an environmentally sound bespoke shroud, to prove just how well you lived.

Excerpted from an article that originally appeared in The Guardian. Reprinted with permission.