I have had two similar situations. The first involved a co-worker who had two miscarriages, one most recently about a month before I found out I was pregnant. I was so worried to tell her, but I knew I had to eventually. The day I announced my pregnancy she got up and left the meeting for a few minutes. She later emailed me that she was sorry for the way she reacted and that she was truly happy for me. Hind sight I wish I would have told her first, away from the group. Now she has been completely supportive and always asks how things are going. But I think I lucked out.
The second situation was with a friend who I didn't realize couldn't have children because she is allergic to her husband's sperm. When she told me I felt so horrible, but I honestly didn't know until then. After I found out about the second person I thought I would just not tell anyone else or ever talk about it again. But my family and friends told me that while its horrible to have a loss (I've been there) I have every right to be excited about my baby and shouldn't have to hide it. While I agree that you should be sensitive to anyone who has suffered a loss, you have been there too. Perhaps you can find some common ground there with your co-worker. I also ask a lot of questions about how their fertility treatments/testing is going which makes it about their future baby instead of focusing on mine.
Hope this helps. Good Luck!