Slept with my ex

I just made the biggest mistake ever. My son's father broke up with me when we found out I was expecting again. I was lonely and asked him to come over to have sex. I know that's stupid but I'm pregnant, who else do I call lol. He stood the night. Before he left he came over and gave me a huge hug and rubbed my belly, which is weird from him. All the times we've broken up he normally just says his byes and leaves. That big really surprised me. I know we are not getting back together. We had a huge fight a few days ago where he told me he's texting someone casually. I'm so bothered by it. And when he left today I wanted to say something so bad. I wish I didn't sleep with him. Biggest mistake ever. I'm only more hurt. Now we are having a little girl in December and I feel horrible that we aren't together.