My boyfriend/The father of my child came out to me as gay (trigger warning) Update

I'm literally due in 3 weeks. My boyfriend came out to me tonight as gay. We've been together 2 years. He sat me down and had a very honest conversation with me and there were a lot of tears. He talked about his dad. He always idolized his dad and said his dad helped him when he needed him the most but he realizes now he was helping him. He told me he was gay and that deep down he always knew it was still there. He told me when he was 10 his dad caught him kissing a boy and was very mad and told him being gay is wrong. Well when he was 12, he got caught doing the same thing and his dad took a different approach. His dad told him men are scary and then his dad raped him to prove a point. He told him this would be his life with a man. He would always be a man's bitch. He would do this to him every time he thought he was being gay or anything. So my boyfriend by the age of 17 thought he was "cured" He realizes he's never loved a women and I'm the closest he's ever gotten to loving a women. And he still only has a friend love for me.... He said in order to get hard when we had sex he caught himself thinking about men yet when he saw them in public he would have a panic attack and he said "My dad didn't cure my homosexuality.... He just left me afraid of men...." That's when he started to tear up... I didn't know what to do besides hold him. He said he mistook his fear of men as being "cured". He did say he didn't cheat. He just realized on his own he is still very gay and needs to see a therapist to get over his rape and be able to live a happy life, with or without a man.... It was all so shocking and all I could do was comfort him. I'm still in shock and honestly really hurting. He was gonna sleep in the living room but I told him he can still sleep in our bed. I've been crying. I am so sad what happened to him and I want him to live a beautiful happy life.... But I'm also sad our baby won't have a mommy and daddy together...

Update: Hey guys.... So I've read your comments and I think about my life. I had too parents who stayed married but hated each other and divorced after I went to college.... I guess I did think.... At least our baby's parents will love each other... Even if it's not in the way most parents do. I'll always love his dad. And we talked and have decided to keep living together. He's gonna turn his office into his own bedroom. We've decided it's important for our baby to not switch between homes it's first year. Not saying there's anything wrong with parents who do that, but we want our baby to have equal time with both parents it's first year which is why we decided to keep living together this first year.