I'm so scared!

So, a few months ago I caught my boyfriend of almost 12 years talking to one of his ex's online, no big deal as she lives out of state. But then she made plans to come here and wanted to spend time with him. We went and met her. My condition was that I had to be there. This is not the first time he was caught talking to someone. I have also found out in the past that he has slept with other people. Now I am not completely innocent, we have had 3 some in the past and on our breaks I have done my own things too. But this time I'm having a really hard time forgiving him because this woman just kept being involved in our lives no matter how much I begged for her to just go away. I finally gave him an ultimatum, these other woman or me and I started putting distance between us. It turns out that he wants to choose us but we still have alot of issue to work through. As of right now we dont know if we are goung to stay together or not. We had a miscarriage in December and decided that we would eventually try again but knew that now wasn't the time. Now I'm 11 days late and I don't know what to do.... I mentioned it to him and all he said was, we have been very careful, it's not possible. but what if it is?? I made an appt with my dr for next week and plan on taking an at home test but I'm so scared. We are on such rocky terms. As much as I want a baby, especially his, I know that now is not the time. So if i am what am I supposed to do. He is the type of guy that would stay with me just because it's the right thing to do, even if it makes him miserable. help me? Idk what the right thing to do is if I am pregnant....