Her candid letter reveals that she has wondered how her husband has felt as his marriage became a "daily struggle to survive" and a "fight for an extra moment of living".
And when she departs, she writes that she wonders how she will be remembered by him and his feelings about becoming a widow.
Of her children and parenting, she writes that "the beautifully etched memories that will come to you in your death are not necessarily the ones you might expect", before sharing details of a moment with her son when he was just 4 days old.
She writes that she would "give anything" to be able to keep protecting her now teenage boy the way she could when he was a newborn.
After finding herself with a life that didn't go according to plan, she tells her children while they can prepare a view of how they would like their life to look "you have to be prepared for the fact that sometimes life is more interesting when you go off-piste — so be brave".
She also tells them to do their best to experience the world and "all it has to offer" now, rather than saving it all for their retirement years.
Amid sharing her own experiences, she advises them to "marry for love", "buy a dog", "appreciate nature" and do things daily that make them happy.
"Every day we wake not knowing if we will see the full 24 hours of the day, so as the sun comes up on a new day, we should feel blessed".
James was personally awarded a damehood by William when he joined her and her family for afternoon tea in her garden, days after she announced she had been put on end-of-life care and didn't know "how long" she had left.
When the news broke that James had died, William and Kate Middleton posted a message to Instagram:
"We are so sad to hear the heartbreaking news about Dame Deborah. Our thoughts are with her children, her family and her loved ones. Deborah was an inspirational and unfalteringly brave woman whose legacy will live on. W & C."
James's family shared a statement announcing her death, which included some words of advice from the brave campaigner.
The statement read: "We are deeply saddened to announce the death of Dame Deborah James; the most amazing wife, daughter, sister, mummy. Deborah passed away peacefully today, surrounded by her family.
"Deborah, who many of you will know as Bowelbabe, was an inspiration and we are incredibly proud of her and her work and commitment to charitable campaigning, fundraising and her endless efforts to raise awareness of cancer that touched so many lives.
"Deborah shared her experience with the world to raise awareness, break down barriers, challenge taboos and change the conversation around cancer. Even in her most challenging moments, her determination to raise money and awareness was inspiring.
"We thank you for giving us time in private as a family, and we look forward to continuing Deborah's legacy long into the future through the Bowel Babe Fund. Thank you for playing your part in her journey, you are all incredible.
"And a few final things from Deborah ... 'find a life worth enjoying; take risks; love deeply; have no regrets; and always, always have rebellious hope. And finally, check your poo – it could just save your life.' (Shared with Deborah's permission)."
• Additional reporting: Bang! Showbiz