You’d hope that a female novelist who writes about life with humour, insight and a deep sense of its fleeting wonder, would be immune to the pain of depression.

Yet, in October 2009, while promoting her latest novel, author Marian Keyes began having panic attacks that blossomed into painful, mental illness.

She tried antidepressants, acupuncture, reiki, meditation, Bach Flower Remedies, even ice-cold showers, but nothing relieved her sense that life was ugly and frightening.

It got so bad, the writer had even decided on the hotel where she intended to commit suicide. And it was only the sense of responsibility she felt towards her husband and family that stopped her.

Writing about those tortuous years, in the introduction to her new book Saved By Cake, Keyes describes the ‘suicide bag’ she’d created, which contained warning signs she would leave hanging on the hotel door, so as to prevent a chambermaid from being traumatised by the event.

By anyone’s standards it’s a harrowing way to begin a cookbook. But any women who’ve ever made a cake in order to soothe themselves, take their mind off an awkward day, or simply to drink in the smell of their childhood, will identify with the feelings of consolation Keyes experiences when she begins baking.

“My friend Helen was visiting. And all of a sudden I decided I wanted to bake her a cake,” writes Keyes. “I hadn’t baked in decades, not since myself and my classmates had been forced to assemble joyless rock cakes in Home Economics when we were 13...”

Keyes, who had suffered milder bouts of depression previously, was now almost completely paralysed by her mental health problems.

“I couldn’t make an off-the-cuff remark about the weather, never mind write a novel,” she explains – and yet, some unknown force prompted her to enter the kitchen. It was the beginning of a new start, and three years later her cookbook is the result.

Saved By Cake: Over 80 Ways To Bake Yourself Happy by Marian Keyes is published by Michael Joseph, priced £16.99

Here are a couple of recipes from Marian’s book to remind everyone why making a cake is one of life’s most basic pleasures:

• Shoe and handbag biscuits

• Rocky road cake