(Please feel free to skip this section if it does not apply to you).
Traditionally, it was considered obligatory to have a male child circumcised before burial even in the horrific situation of a stillborn boy or a boy who died shortly after birth. In such circumstances no prayer is recited. The mohel performs the procedure either at the graveside or at a funeral home. This fulfills the very specific requirement in Jewish law that the foreskin of a male is to be removed. The deceased child is given a Jewish name. This sacred obligation was carried out even in the horror of the concentration camps of WWII.
More recently, some rabbis have argued that circumcising a deceased baby is NOT obligatory but rather the wishes of the family should be taken into account. In these very difficult cases, the family should discuss with their rabbi and a mohel how they should proceed.