On 11 August, 2014, Robin Williams committed suicide in his California home, while suffering from depression that followed being diagnosed with early-onset dementia.

Now, the late comedian's wife Susan Schneider Williams has released a personal essay detailing the struggles the two of them went through as they attempted to deal with the illness.

The Terrorist Inside My Husband's Brain was published in the scientific journal of the American Academy of Neurology and describes the weeks before the actor died.

"Robin was losing his mind and he was aware of it," Susan writes in an article published on 27 September. "Can you imagine the pain he felt as he experienced himself disintegrating? And not from something he would ever know the name of, or understand? Neither he, nor anyone could stop it — no amount of intelligence or love could hold it back."

The mystery disease led Williams to struggle with tremors, panic attacks, insomnia and memory loss, leaving him struggling to walk or remember his lines during filming of Night at the Museum 3 – developments that were "devastating to him," says Schneider.

It took a while for doctors to identify what the Good Morning, Vietnam actor was actually suffering from.

"Robin] kept saying, 'I just want to reboot my brain,'" wrote Schneider. "Doctor appointments, testing, and psychiatry kept us in perpetual motion. Countless blood tests, urine tests, plus rechecks of cortisol levels and lymph nodes. A brain scan was done, looking for a possible tumour on his pituitary gland, and his cardiologist rechecked his heart. Everything came back negative, except for high cortisol levels. We wanted to be happy about all the negative test results, but Robin and I both had a deep sense that something was terribly wrong," Susan continues.

"On May 28th, he was diagnosed with Parkinson's disease. We had an answer. My heart swelled with hope. But somehow I knew Robin was not buying it."

It was only after the post-mortem was done, did she get a clearer idea of what her husband had suffered from.

The reports suggested that the Mrs Doubtfire star had been suffering from Lewy Body Disease, a type of degenerative dementia that often goes under-diagnosed despite affecting almost 1.5m people in America last year. There is no cure for Lewy Body disease.

Robin Williams
Robin Williams' LBD was only discovered during his post-mortem Peter Kramer/Getty Images

"How I wish he could have known why he was struggling, that it was not a weakness in his heart, spirit, or character," Susan mentions in the article, ending it with a plea to the neurological community to "help make a difference in the lives of others".

Schneider, a graphic artist, concluded by saying that in spite of the torment she and Williams endured, the couple enjoyed a peaceful closing weekend that was like "one long date".

"When we retired for sleep," remembers Schneider, "in our customary way, my husband said to me, 'Goodnight, my love,' and waited for my familiar reply: 'Goodnight, my love.'

"His words still echo through my heart today.

"Monday, August 11, Robin was gone."

The Samaritans provides a free support service for those who need to talk to someone in the UK and Republic of Ireland. It can be contacted via Samaritans.org or by calling 116 123 (UK) or 116 123 (ROI), 24 hours a day, 365 days a year.