This has happened to me. My sister in law had a son 6 months after my daughter died. I was just honest and told them I couldn't be around babies because it was too painful. That this was universal, any baby harms me not just them, and that I would let them know when I was feeling more capable. For me, around 4 months when a baby has head control, it gets easier.
You have been through something traumatic and you have a right to protect yourself from futher pain. It is possible they will be looking for some leadership. It is also possible that your needs don't really fly with them and your friendship. It will either work out or it won't.
You deserve space and support instead of pretending and suffering.
Sorry about that shitty brutal email. You are right, when people spew that God gives them good fortune of a new born baby, they automatically imply that God inflicts torture on the families who's children die. Unreal.
I wish you well with your tough situation.