Pregnancy and betrayal

I’m half way through my pregnancy and I just found out the father of my child has been emotionally cheating on me through various online chats and had been talking to one girl specifically. It breaks my heart knowing I went laid down with this man every night up until I found out thinking everything was perfect between us... I’m 26 weeks and losing my mind here I’m scared for the future I never wanted my child to grow up in a broken home but I could not try to work it out with someone just because I have a child with them