Having to go to a baby shower

Have been trying for 2 years now with my husband (we’ve been married for almost 5) and just went to the baby shower of my cousin who got married less than 2 years ago. I want to be happy for her so badly but I just can’t help but cry. Then my mother told me a family friend that is younger than me is also pregnant. Why does it hurt so bad and I just can’t be happy for other people?