I read this book a few years ago and it covers the history:
https://smile.amazon.com/Crazy-Fathers-Through-Americas-Madness-ebook/dp/B001M0BUL0/
You can also start with the Wikipedia article. And here's another book that covers the history of mental health treatment in the us:
https://smile.amazon.com/Mad-Among-Us-Gerald-Grob/dp/1451636334/