Cemeteries are curious places, especially when you’re young. Scary and thrilling, of course; they’re filled with dead people! But also oases of calm, respectful silence, often deserted, except on Sunday mornings. It’s little surprise that they have fascinated writers and provided settings for a multitude of books.

I grew up in a town bordered by three large municipal cemeteries and took bits of all of them for the graveyard that is the main setting for my novel Things Can Only Get Better. It’s set in 1996, when Arthur, who is in his 70s, is so grief-stricken by the death of his wife Molly that he refuses to leave her graveside, eventually moving into and fixing up a derelict chapel and becoming a sort of unofficial caretaker.

Like the necropolises of my youth, Arthur’s graveyard is a magnet for local children, specifically a group of girls with no hope or ambition, and nothing expected of them other than to leave school and get pregnant.

Especially when the cemeteries are surrounded by closely packed housing estates and edged with busy roads, stepping through their gates is like entering a borderland between worlds, neither this life nor the next.

Here are some of my favourite books exploring this liminal territory.

1. The Graveyard Book by Neil Gaiman

It stands to reason, for those of a certain bent, that cemeteries, being the resting places of the dead, will be home to ghosts. The spirits who haunt Neil Gaiman’s 2008 children’s book are benign, taking in and looking after Nobody “Bod” Owens, the only survivor of his family’s massacre at the hands of a serial killer called Jack. There are supernatural menaces to be overcome, but ultimately the real evil is done by the living.

2. Pet Sematary by Stephen King

Graveyards are fertile ground for horror, usually through their desecration or disrespectful treatment. King’s 1983 take on the undead genre sees a family buying a remote house with its own pet burial ground that does a nicely creepy line in bringing family pets – and people – back to life, but horribly changed. Which, presumably, they never mentioned at Purple Bricks.

3. A Fine and Private Place by Peter S Beagle

More haunting than haunted, Beagle’s moving 1960 fantasy novel follows Jonathan Rebeck, a former pharmacist who has dropped out of ordinary life and lives, penniless and homeless, in the fictional Yorkchester cemetery, where a friendly raven supplies him with food stolen from picnic baskets. Able to speak with the dead, Rebeck plays matchmaker between the ghosts of a young teacher and a bookshop worker, then has to fight to keep their spirits together when the threat arises that one of their bodies will be moved.

4. Lincoln in the Bardo by George Saunders

Here the spirits of the dead inhabit the “bardo” of the title, a sort of halfway house between death and resurrection based on the Tibetan notion of rebirth, which is tethered to Oak Hill Cemetery. This houses the crypt of Willie, son of Abraham Lincoln who has died aged 11. The US president’s grief threatens to keep his son in the limbo of the cemetery for ever. Unlike the first three books, which are resoundingly “genre”, Saunders’ novel won the 2017 Booker prize so is devoutly “literary”. However, it’s so good we won’t hold that against it.

Misnomered … the Merry cemetery in Săpânța, Romania. Photograph: Bogdan Cristel/Reuters

5. Death: A Graveside Companion by Joanna Ebenstein

A wonderful rough guide to death, to help us navigate that awfully big adventure. Through a series of essays by different writers, the cultural attitudes to death across the world are examined, and there are a wealth of illustrations of artefacts from prehistoric to modern times.

6. The Shadow of the Wind by Carlos Ruiz Zafón

It isn’t only people that go to cemeteries to moulder and eventually be forgotten. It’s books, too, as suggested in Ruiz Zafón’s bestseller. In the aftermath of the Spanish civil war, a young boy is inducted into the secrets of the Cemetery of Forgotten Books, where the memories of abandoned, lost narratives are carefully curated. A cemetery in abstract terms, perhaps, but with some correlation with traditional graveyards, where the etched words on gravestones prevent the names of the dead from slipping from the world entirely.

7. Falling Angels by Tracy Chevalier

The follow-up to Chevalier’s breakout novel, Girl With a Pearl Earring, Falling Angels immerses itself in the Victorian obsession with death and taste for grand necropolises. It follows the fortunes of two families bound together by the friendship between the daughters of the houses. The girls have their own obsession with the local graveyard that houses the two families’ adjacent plots. As the Victorian era gives way to the Edwardian, and a new world in a new century, sexual mores are challenged and the certainties of life and death, as reflected in the grand London graveyard, are upended.

8. 199 Cemeteries to See Before You Die by Loren Rhoads

Whereas the Ebenstein book is a meditation on death, this is more a road map to some of the best graveyards around the world. From the southern gothic of Savannah’s Bonaventure cemetery to the celebrity-stuffed Père Lachaise in Paris, Rhoads takes you on a world tour of final resting places, introduces you to their most famous residents, and offers a wealth of enticing history and sharp details, such as the brightly coloured, hand-carved wooden gravestones in Romania’s surely somewhat misnomered Merry cemetery.

9. Fun Home by Alison Bechdel

Between us shuffling off this mortal coil and being buried, cremated or otherwise laid to rest, there is the business of preparation and funerals, brilliantly depicted in Bechdel’s bestselling 2006 graphic novel. The story details her own upbringing with her rather tyrannical father, a third-generation funeral director. The non-linear narrative entwines the business of death with both Bechdel and her father’s personal journeys with their sexualities, and the aftermath of his death.

10. Her Fearful Symmetry by Audrey Niffenegger

As part of her research for this 2009 novel, Niffenegger, author of The Time Traveler’s Wife, took a job as a tour guide at London’s Highgate cemetery. That’s the job she gives to Robert, who is the lover of first Elspeth, who dies of leukaemia, and Valentina, who is the daughter of Elspeth’s twin sister and who is herself half of a set of identical twins, with Julia. Like the more remote corners of your favourite graveyard, it’s a tangled plot, but a beautiful one.

• Things Can Only Get Better by David M Barnett is published by Trapeze Books (£8.99) on 14 November.