TMZ has obtained documents showing Williams was struggling with the disease, which is marked by abnormal protein deposits in the brain that disrupt normal function.
Lewy Body Dementia is a common condition associated with Parkinson's ... and people afflicted by both often get severe side effects from Parkinson's meds. Hallucinations are common, where patients see phantom objects, people or animals. The patients often try to converse with the illusions.
Robin's wife had told authorities shortly after his death he had been complaining about the meds and the way they made him feel.
Sources connected with the Williams family tell TMZ ... Lewy Body Dementia was the "key factor" they believe drove him to kill himself. We're told Robin's doctors agree that the disease was the critical factor leading to his suicide.