James died on 28 June after a six-year battle with cancer. She had revealed in May that she had been moved to at-home hospice treatment.
In an extract from her forthcoming book, How To Live When You Could Be Dead, James revealed that she lived with anxiety for most of her life.
She recalled a panic attack that she one had while in the changing room of a Karen Millen store in London’s Covent Garden, which caused her to run into the street in her underwear.
“I often woke up in the middle of the night already in the grip of an episode, believing my body was dying,” James said in the extract published by The Sun.
“The great irony, of course, being that when I was younger and not facing death, my fear of it was so uncontrolled that quite often it stopped me from living.
“I stayed at home when I should have been out enjoying myself, I missed holidays because of my fear of flying. Do you know what finally ‘cured’ me?
“The worst happened and my fear was realised - I was told I had incurable cancer and that I would die.”
James said that the diagnosis means she “had no choice anymore”, and that she had to “look her biggest fear straight in the eye”.
The Sun also published a letter from James to her two children, Hugo, 14, and Eloise, 12, where she told them to “take chances” and “only marry for love”.
“I wish I had learned at a young age that making time for your marriage to work should be as much a part of your timetable as going to the gym or cleaning your teeth,” the letter read.
“It’s important that you don’t allow the big arguments to build up, when all you really want is to forget about everything and cuddle the one person who you love.”
How To Live When You Could Be Dead will be published on 18 August.
Additional reporting by PA