Boyfriends ex is pregnant

So I knew my boyfriend for 2 years and we dated for 6 months and broke up. A couple weeks later he was with a new girl & they were together for about 6 months as well. They just broke up last week and he and I've been seeing each other again. 
However, he just told me his ex is 11 weeks pregnant with his baby and they had planned it but weren't happy together. He says he's still gonna be there for her and is extremely excited for the baby. 
I don't know why but I'm heartbroken. Any advice? What would you do?