How are you able to be happy for friends having babies?

I am struggling from secondary infertility, and it seems like all of my friends and family are pregnant or giving birth to babies. I am happy for them, but currently I feel overwhelmed with my own sadness when they share their great news. Any tips or perspectives to share that may help?