I'm sorry - for your loss, and how heartbreaking it is to handle all this amidst your own heartbreak.
One of the best things I ever did was leave Facebook. At first I worried, I would lose out by missing news and messages online... then realized, if I or a relationship am/is important enough to people, no longer being on Facebook should not be an issue. I worked through a little anxiety of missing the updates, opportunities to attend things or respond to invites, etc. that way... I found that anxiety ended up over time being less than the anxiety of being on FB and dealing with other things.
The other thing I did, was hang onto relationships where people were good to me, sensitive and understanding. If I opened up to people about infertility, losses, going through a hard time, etc. and there was nothingness in return - silence or lack of empathy or distance or so on, I had to let that go. Being in those relationships caused me such great anxiety and sadness. There is grief in letting people go, working through that is a different kind of loss than working through feeling mistreated or neglected.
I chose to focus on relationships that were mutual. ie. a friendship where people show empathy, a listening ear and support whether or not you can relate to one another's fight or sadness. Unfortunately less people know how to validate infertility and the loss of a baby than other scenarios requiring support, but I figured after giving it a try and even perhaps a second try expressing how hard things were for me or not feeling healthy, if the other person continued the behavior, it was a no go.
I found I was able to be genuinely happy for pregnant friends and their new babies, if they were genuinely invested in me too. I personally find it much harder to rally around someone who ignored my health, losses and struggles. It has made me feel better over time to realize that I don't have a completely black and bitter heart (lol), but that I can compartmentalize my infertility and losses depending on the safety of the situation and the relationship.
If people don't know about your struggles, they may not understand your response depending on what it is. If people didn't know mine or I didn't want them to know, sending a text, email, card or gift can substitute in-person or phone interactions but still acknowledge their happy time.
I also have found counselling (with an infertility-specific counsellor) a godsend - someone who gets IT ALL, and empathizes, while helping me to feel better about myself and better myself in the process.
Hang in there, it's very hard. The sting of this situation will recede, but self-care is so important in this journey. Don't forget to do what's best for you.