Husband cheating on me while i was in the hospital

My husband was at home caring for our son while I was inpatient at the hospital for 4 days. I was very ill and they finally just sent me home because they couldn't treat me anymore. I have to  pass kidney stones. I am pregnant with twins and working two jobs. He does nothing. Well while I was in the hospital he downloaded kil and started sexting and sending masterbation videos back and forth with different girls. We have had this problem in the past but it was a long time ago and we've moved passed it. I finally trusted him again. I have 3 children and now I'm pregnant with twins. He has a TBI and PTSD on top of being bipolar and has a lot of issues when he's not taking his medication. I'm sick to my stomach. I don't know what to do anymore. He half assed apologized. I'm in a custody battle still with my ex husband and don't want to do all of it again. My husband and I have worked very hard to get where we are. I feel like I carry everything alone between working and doing all of the va and social security stuff. Now he has too much free time and does this. Any advice?