David Cameron says the death of his eldest child, Ivan, made him feel “as if the world stopped turning”.

In his forthcoming autobiography, For The Record, the former Prime Minister writes about how he was “bursting with pride” on April 8, 2002 when his wife Samantha gave birth to the couple’s first child.

Ivan was small but seemed healthy, though he was born by emergency caesarean section.

Mr Cameron writes in the book, serialised in The Sunday Times, that Ivan soon began to lose weight, was not feeding properly and was having seizures.

Ivan was diagnosed with Ohtahara syndrome, named after the Japanese physician who first observed it. Mr Cameron writes that the cause was unknown, the treatment options were uncertain and there was no cure.

“He could have 20 or 30 (seizures) in a day, lasting for minutes, or sometimes hours, his small frame racked with spasms and what looked like searing pain.

“By the end his clothes would be drenched in sweat and his poor little body exhausted.”

After years of medical difficulties and round-the-clock care, Ivan died at St Mary’s Hospital in London on February 25, 2009, aged six.

“Nothing, absolutely nothing, can prepare you for the reality of losing your darling boy in this way. It was as if the world stopped turning,” Mr Cameron writes.

As then Leader of the Opposition, he was due at the House of Commons for Prime Minister’s questions the next morning, but Gordon Brown, whose daughter, Jennifer Jane, had died a few days after she was born, adjourned the house for the day.

Mr Brown’s “real warmth and humanity meant a lot to us,” Mr Cameron writes.

The Camerons had three more children after Ivan, daughters Nancy and Florence and son Arthur Elwen.