Johhny, I am so sorry to hear about all you have been through and losing your father and best friend at the time just makes it so much worse. I am afraid that I know very well what you have been going through. Without the horror of having to decide on pulling the plug on your late father I have been through the very same thing early this year. For reasons I will never know my former wife decided to tell my doctor I was suicidal, which I most certainly was and am not. I was then sent to a mental institution about 3 hours away and was kept there for three weeks, entirely against my will and under extreme duress. They tried to kill me in various ways due to total incompetence and being around the people also there was nearly impossible to take.
I have been diagnosed with full Complex PTSD by a very good forensic psychiatrist. A lot of what you relate is very similar to my situation. It has also been found that sending people like us to a psychiatric ward can result in PTSD. I won't attempt to diagnose you, that isn't my work but it won't be the least bit surprising if that is the case. You very much need to see a good psychiatrist for a diagnosis.
While I was at the ward my former wife called me and told me "when they let you out and you come home I won't be there". That was what gave me a full melt down and the PTSD set in within a day. It was complete with nightmares and very bad sudden startling when they called my name while sleeping to give me meds that could kill me.
I very much know how you are feeling and feel so very sorry for what you have been put through. Nobody deserves this kind of treatment no matter what they may have done. The mental wards are by far the worst place to send somebody already in severe distress such as you were. I totally understand your fear of being sent back there for some reason. I feel the same way.
That is especially the case when your wife is leaving you and for no good reason. That is what happened to me and I was and even now am totally against it but there is nothing I can do. This entire year has been the year from hell with no way for me to do what is right or make any choices that are something I want to do. All I can say is that in my case the therapists can only tell me to try to look forward and not back. Plan ahead the best you can and with time it will very gradually fade into the past. Your memories will never go away entirely but think about your future and look forward to good things that will happen again sometime. It is very hard for me to think that way but I am trying as hard as I can, often without success. But I am doing better now, little by little. It doesn't seem like it day by day or even week by week but when I look in my Journal it is clear I am doing better than I was months ago.
You should keep a journal for this very reason. Then you can check back and you will eventually see that you are actually doing better than you were. That is all I can suggest and I so very much hope you will feel better soon. You certainly shouldn't feel down on yourself. The way you have been treated is not your fault and was entirely beyond your control. Put it behind you as much as you can.