Perhaps, I will answer from a Marxist point of view, and perhaps a little intolerant towards others, but oddly enough, such people created religious movements and were their leaders;) Although, on the other hand, perhaps not only religious ones. There are a lot of studies that many prominent figures and revolutionaries had mental disabilities, some within the norm, and some not.
Until the middle of the 20th century, no one thought about the quality of life of patients. The main task was isolation and "neutralization". Various means of fixing were used: chains, belts, straitjackets, strait beds. The pinnacle of the idea of "neutralizing" the mentally ill was lobotomy, which certainly relieved the patient from delirium and hallucinations, but at the same time from his very personality, turning him, if lucky, into an animal, and if not, into a plant.
They fared pretty badly, common methods of treatment were - cold water, darkness and chains for the violent, it's good if they were not seen in them possessed by the devil, but simply fools or holy fools, although many of them ended up on the fire as witches or sorcerers. Here is a highly informative article on your topic - medicus.ru