Welcome to PC jellybean. The new information about your boyfriend is a lot for you to take in. I can certainly understand how you would be shook up about it. I was imagining how I might feel if I learned something like this and it would be everything from very sad for him and the situation to jealousy that he shared something so intimate as having and then losing a baby with someone else. I would also be disturbed that he didn't tell me sooner although maybe he didn't want you to know because he values your relationship to the degree that he feared it might scare you off.
That said, maybe what you need to do is what I call PAUSE, which means do nothing for now, accept how you are feeling no matter how crummy it does feel (even if you are feeling guilty or angry, that is okay, try to be compassionate with yourself) and find someone to talk it through with such as a good friend or a counselor. Your brain is on overload and that is understandable. But this doesn't necessarily have to be the end of what has been a good relationship. It might be the beginning of something more intimate for the two of you if you can work through it.
(((Hugs)))
|