Q. Someone who is in shloishim for his father and his wife gave birth does he make sheheheyonu and does he bentch goimel?

A. Shulchan Oruch (O.H. 223: 1) rules that when a son is born one recites Hatov Vehametiv. For a daughter Mishna Berura (ibid.) suggests to recite shehecheyanu. Mogen Avrohom (551: 42) writes that that an ovel is allowed to recite this brocho. Be’er Moshe, (4: 74) Nitey Gavriel (2: 25: 13) and others opine that this includes the shiva period as when fulfilling a pidyon haben mitzva. There are a few exceptions such as the public brocho in shul when lightning the menorah or reading the Megila, since these are subject to a greater degree of simcha and joy. (ibid.)

Some have the minhag to recite hagomel after one’s wife gives birth or when the yoledes attends shul for the first time. (Mishna Berura 219: 17) Horav Shlomo Miller’s Shlit”a opinion is that there is no restriction for an ovel during shiva to recite hagomel when a minyan is present.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a