Husband cheated on me in prison with a man.... Can we save our marriage?

My husband got out of prison a month ago. He did 2 years for a crime he committed before we even met that involved drugs. I said I wanted us to make it work. During his stay for some reason he wasn't getting his medication. He was fine the first year. After that for some reason they took him off his meds. And he's schizophrenic! He needs his meds! He started to spiral and I along with his mom was trying to report the prison and call who we could to get him on his meds. They eventually instead of putting him on his meds just transferred him to a block that had more mentally ill people. From what my husband could tell me not everyone there was mentally ill. Some got moved there for safety reasons but it was basically for people that were high risk to endanger themselves. He did at one point in prison try to tell me he cheated on me but I thought he was delusional from being off his medication. He's back on his medication and confessed to cheating on me with a man in prison. I left home... And I'm back now and we talked about it. He said he tried to hang himself and this man got him down. I asked him tbh. Was he in love with this person because they had an affair during his whole schizophrenic episode which lasted his last 9 months in prison. He said he doesn't think so and he was just depressed and lonely and delusional. Someone had saved him and he couldn't think straight. He had spent so much time scared of his own thoughts that he felt safe. We have talked it out and I don't want a divorce. I know everyone will tell me to leave but I do want to save our marriage. He's already been tested for STDs and has come back clean. Plz any advice besides leaving 🙏🙏🙏