Having those feelings are so understandable and you can't control them, but how you behave as of a result of them is what you can control.
I have been on both sides of this, I had a miscarriage then three years of unexplained infertility whilst my husband had treatment for cancer. I found all of those announcements so difficult, particularly the ones where they hadn't been together long, unstable relationships etc. But I was still there for my friends and visited babies and was glad to get to know the new little people in my life despite feeling really sorry for myself after a shit few years.
When I did fall pregnant naturally, just after being referred to start IVF, a close family member was starting her IVF journey. My pregnancy within the family was not mentioned or celebrated. It was actually really sad after all that time to be shut down if I referred to being pregnant. I was so worried that the family and my parents wouldn't accept my baby out of loyalty to the other family member. It really cast a shadow over what should have been a wonderful time and left me feeling anxious and fearful.
That family member then fell pregnant a year after me and has had their baby now. All of that excitement and joy within the family was taken away from me at the time and for what purpose now?
I guess my message is, try not to let those feelings control the way you behave. Be honest if you are struggling, don't go to the baby showers and all that rubbish if you don't want to. But do let those people know you still care about them, but that you are having a hard time and don't make it about them when really it's about you.
Good luck to you all.