The widow of Robin Williams has lifted the lid on the actor’s struggle with a debilitating neurological disease in the months before he took his own life, likening it to “chemical warfare in his brain”.

Writing in the journal of the American Academy of Neurology, Williams’ wife Susan Schneider Williams has detailed the final months of her husband’s life as the couple struggled to respond to his devastating decline in health.

Williams took his own life in August 2014.

Three months before his death Williams was diagnosed with Parkinson’s, but Schneider Williams has previously revealed the autopsy identified that he had suffered from Lewy body disease (LBD).

In her essay, “the terrorist inside my husband’s brain”, she said doctors would later discover it was instead one of the worst cases they had ever seen.

LBD is an incurable form of neurodegenerative disease. It is the second most common form of dementia after Alzheimer’s, with which it shares many symptoms, and can be misdiagnosed as Parkinson’s disease.

In October 2013, on the couple’s second wedding anniversary, Williams experienced gut discomfort, and fear and anxiety which “skyrocketed to a point that was alarming”, Schneider Williams wrote.

He had already been experiencing various physical ailments, which had been intermittent and which the couple and doctors had believed were unrelated. By December he would suffer from increasing levels of “paranoia, delusions and looping, insomnia, memory, and high cortisol levels”.

After his death doctors found that a high concentration of Lewy bodies in his brain’s amygdala had caused the acute paranoia and “out-of-character emotional responses”.

Schneider Williams described it as “chemical warfare in his brain”.

“How I wish he could have known why he was struggling, that it was not a weakness in his heart, spirit, or character,” she said.

Over the following months Williams suffered from panic attacks and memory loss, struggling to remember lines during the shooting of Night at the Museum 3.

He kept saying, ‘I just want to reboot my brain’.

His mental state declined, and Schneider Williams found herself increasingly unable to reassure his anxieties and insecurities.

“Robin was losing his mind and he was aware of it. 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,” she said.

“He kept saying, ‘I just want to reboot my brain’.”

While had been diagnosed with Parkinson’s disease, Schneider Williams wrote that after his death it became apparent that, pathologically, he suffered from diffuse LBD.

“One neuropathologist described LBD and [Parkinson’s disease] as being at opposite ends of a disease spectrum. That spectrum is based on something they share in common: the presence of Lewy bodies – the unnatural clumping of the normal protein, a-synuclein, within brain neurons,” she said.

Schneider Williams said four doctors examined her husband’s autopsy report and final two years of medical records and they “indicated his was one of the worst pathologies they had seen”.

“He had about 40% loss of dopamine neurons and almost no neurons were free of Lewy bodies throughout the entire brain and brainstem.”

She said the medical team had been on the right track in diagnosing and treating Williams before he died, but she would never know if that would have made a difference.

“I am not convinced that the knowledge would have done much more than prolong Robin’s agony while he would surely become one of the most famous test subjects of new medicines and ongoing medical trials,” she said.

“Even if we experienced some level of comfort in knowing the name, and fleeting hope from temporary comfort with medications, the terrorist was still going to kill him.”

Schneider Williams, who was last week appointed to the American Brain Foundation’s board of directors, said she wrote the essay to increase neurologists’ understanding of patients and caregivers and to “add a few more faces” to the reasons they conduct research.

• In the US, the National Suicide Prevention Hotline is 1-800-273-8255. In the UK, the Samaritans can be contacted on 116 123. In Australia, the crisis support service Lifeline is on 13 11 14. Hotlines in other countries can be found here.