Rikke Schmidt Kjærgaard is standing at her apartment door to greet me. She smiles warmly, ushers me inside, takes my jacket and puts on the kettle for tea. Can this really be the person who was clinically dead, then locked in a coma from which doctors believed she would never recover? The woman whose husband was told that, in the unlikely event that she did survive, both her hands would need to be amputated, as well as her nose, most of her face and several of her toes?

In her new book, The Blink of an Eye, there’s a passage in which Rikke, lying in a hospital bed, hears how gangrene is destroying her hands; in that moment, she writes, she realised “that I was a passenger in my own life, no longer calling the shots, and that I was not in control. I would never run my fingers through my hair again, never snap my fingers to a catchy tune, never feel my children’s faces through my fingertips.”

Rikke’s response was defiant, powerful – and supremely understated. She blinked; a blink that signalled her determination to defeat the bacterial infection that had overtaken her body, keeping her a prisoner inside herself, jeopardising all she had been and her entire future. Because one blink meant, quite simply: no. Rikke was not prepared to accept a reduced life as a result of her devastating illness.

The irony is that though the doctors were wrong about her losing her hands, her nose, her face and her toes, they were right about her fingers: she has lost them, every one, and her only remaining digit is her left thumb. It’s a good five minutes into our chat before I’m aware of her hands; she holds them up to show me, and says it’s extraordinary how much we humans use our fingernails, and it’s only when you lose them that you realise it.

Back to life: Rikke as she is today. Photograph: Soren Solkaer/The Observer

But, as with everything else about her story, Rikke has a positive spin. The good thing, she says, is that she can use three of her finger-stumps for typing. No matter that at one point during the writing of her book they were bleeding and the skin was cracked: the important thing is that she was able to write it, and to communicate not only how it feels to be locked inside a coma, but also what got her out of it – and how her life is changed forever as a result of that extreme experience.

It was New Year’s Day 2013 when everything changed. Rikke was 38, a molecular biologist who, the year before, had become a member of the prestigious Young Academy, an institution for the most promising scientists under 40 in her native Denmark. She was a mother of three children – Johan, Victoria and Daniel – who were then aged 18, 14 and eight. She and her husband, Peter, another scientist, had lived for several years in Cambridge before moving to Harvard, but were now back in Copenhagen. Out on a walk to celebrate the new year, she became aware of how incredibly cold she felt; back home, she had a bath to try to warm up. “When I got out I was still freezing cold,” she remembers. “Cold to my core. It hit me that something was very wrong.”

I was a passenger in my own life, no longer calling the shots, and not in control

Flu, she thought, it must be flu. But she felt worse and worse, drifting in and out of consciousness, in and out of sleep. Peter called a locum doctor, then a few hours later their own GP, who realised straight away how serious Rikke’s condition was. A lupus sufferer, it would later turn out that her body was under attack from the deadly bacterial infection Streptococcus pneumoniae. By the time she was loaded into an ambulance she was clinically dead. Paramedics managed to restart her heart on the journey to the hospital and, for a long time after that, a heartbeat was pretty much all Rikke had. She remembers nothing about the whole of the next month. “All my organs were failing, and I was in a coma. It was going to be an incredibly tough job for my body to get back on track.”

There are, says Rikke, no “Hollywood moments” for a patient in a coma. “You don’t wake up and say: ‘Where am I? What’s happening?’ It’s really very slow: you are awake for 10 seconds and then you’re unconscious again. But gradually, very gradually, you wake up more and start to stay awake for longer periods.”

All of that was well and good, but the problem for Rikke was that, though she was emerging from her coma, she was unable to communicate with the people around her. In her book she describes how hospital staff talked across her, how the doctors expected her brain had been destroyed by the infection, and how no one expected she would ever be cogent and communicative again. Everyone, that is, apart from one person: her husband, who was with her night and day in the early weeks.

When Rikke opened her eyes, Peter looked into them and, somehow, he knew she was still in there. “It was all so unreal, and he couldn’t believe what was happening, but at the same time he felt that our life together was not finished, that we could not be over.”

The worst thing was the loneliness: knowing you can’t communicate what you are feeling is devastating

Rikke and Peter met as students, she tells me as we chat in her colourful Copenhagen apartment. In the days before she could open her eyes, when her situation seemed hopeless, Peter sat beside her bed and planned her funeral: a ceremony by the River Cam at which he would scatter her ashes on the water. It is, says Rikke now, exactly what she would have wanted.

In those early days in the hospital, Peter – then a university professor, now the head of Copenhagen’s Natural History Museum – wrote down every shocking, horrific twist and turn of Rikke’s extraordinary story. A nurse recommended he did it, thinking it would help him grieve after Rikke was dead. Instead, it formed the basis for her book, because she can remember nothing of the early weeks.

Her first recollections are the terrifying realisation that she was “locked in”, as the nerves that controlled her muscles had been paralysed, and how that felt. “The worst thing was the loneliness: I had nurses with me around the clock, but knowing you can’t communicate what you are feeling is devastating. Human beings love to be social – we love interaction. Not being able to reach outside of yourself ruins you as a human being. If you can’t engage, if you can’t get through to other people, you suffer terribly.” It was a fortnight, she says, before Peter and the nurses came up with a system that allowed her to use the only movement she did have – blinking – to communicate: one blink for no, two for yes. It was a turning-point, but there was a very long road still to travel.

The children were also essential to her survival. Early on, when Rikke looked – in her own words – bloated and battered, with hands blackened by gangrene and thinning hair, her daughter Victoria brought in a photograph of her in Cambridge. Having that by her bed, says Rikke, made a huge difference: from then on, the hospital staff saw her not as a desperately ill body in a bed, but as someone who had been healthy and happy, and who hoped to be healthy and happy again.

Finally came the day she was able to utter her first, and very apt, word: 'weird'

Rikke spent five months in hospital, and her book details the agonising path to an almost-full recovery (as well as losing her fingers, she is virtually blind in her left eye). There is the day she utters her first, and very apt, word: “weird”; the days she becomes paranoid and delirious, a common occurrence in coma patients; the terrifying times when she is hauled, in agony, into an upright position in physiotherapy sessions. And then, as she gradually regains her strength and autonomy, there are some incredible milestones: the day she leaves the hospital to first buy the ingredients for, and then cook, a birthday cake for Peter; the day she takes Daniel to his school and climbs the mountain of steps to his classroom, with him holding her hand, willing her to do it, and glowing with pride when she reaches the top.

In some ways, she says, her experience made her the baby, rather than the mother, of the family. “There’s been a lot of role reversal. Even now, five years on, the children will carry things for me and ask me how I’m doing. They really take care of me. I get tired easily, I don’t have the energy that I had in the past, and all the children are very sensitive to that and very understanding of it.”

The single hardest thing to deal with, she says, was not being able to properly mother her kids. “I missed being able to hug them, being able to sit and eat and chat with them, being able to take them to school. It was all those ordinary things of family life… I longed for them.” During the relentless months of physiotherapy, of endless, sheer hard work to get herself fit again, Peter used to will her on by talking about how her life could change in the future. “He’d say to me: you can do this. You can come through it and when you come out on the other side you can do whatever you want to do. You can quit your job, do something different. We have to make the future full of things that matter – and good times, time to be together.”

Peter said to me you can quit your job, do something different. We have to make the future full of things that matter

In her old life, says Rikke, she would write academic research articles that might be read by 50 or 60 people. “But when I recovered I realised I needed in my new life to reach out to more people than that. I wanted something that made sense in a larger context,” she says.

She and Peter were acutely aware of how difficult it had been, even as scientists, to communicate effectively with the hospital staff looking after her. “You experience a total loss of control; and in my situation, being a patient was really difficult. I met so many different doctors and every time Peter had to tell them over and over what had happened to me. So when I got better I said to him: ‘There has to be a better way to do this.’”

She is now in the process of setting up an organisation – its working name is Lifeline – that will give people the digital tools to own their personal medical data and to decide who they want to share it with. “It’s all about patient empowerment,” she says. And the book matters too, because, she says, although her case was so unusual, everyone experiences a crisis at some point in their lives – and many of the lessons she learned are universal ones.

“It’s all about being there for people, about never underestimating the difference it can make to simply be with someone in their difficulty, to be beside them, to not leave them. I want to give people hope. It’s what got me through and it’s why I’m where I am now.”

The Blink of an Eye by Rikke Schmidt Kjærgaard is published on 31 May (Hodder & Stoughton, £16.99). Order a copy for £14.44 at guardianbookshop.com.