Presented by Rav Shmuel Pinhasi Shelit"a of Jerusalem
The Gemara teaches in Masechet Berachot (54) that if a person’s father passes away, Heaven forbid, and he has no brothers, then he recites the Beracha of "She’hehiyanu" (over the inheritance that he will be receiving). The Gaon of Vilna (1720-1797) noted that this ruling clearly indicates that a mourner is permitted to recite the Beracha of "She’hehiyanu." Even during the Shiba period, the mourner is not obligated to avoid situations that require the recitation of this festive Beracha. This is also the position of numerous other Aharonim, including the Maharikash (Rav Yaakov Kastro, Egypt, 1525-1610) and the Radbaz (Rav David Ben Zimra, Egypt, 1479-1573).
On this basis, the Gaon of Vilna disputed the ruling of the Shulhan Aruch (Orah Haim 551) that one should avoid reciting the Beracha of "She’hehiyanu" during the Three Weeks (the period from Shiba Assar Be’Tammuz through Tisha B’Ab). The Gaon contended that if a mourner, who grieves a family member, is allowed to recite this Beracha, then this should certainly be permitted when we mourn for a tragedy that befell our nation many centuries ago.
In truth, however, one can refute this argument. The period of the Three Weeks is a time of calamity for the entire Jewish Nation, and therefore, one cannot recite the blessing of "She’hehiyanu," giving thanks to G-d "who has kept us alive, has sustained us, and has brought us to this time." Since this period is a tragic one for the entire nation, it is inappropriate to thank G-d for bringing us to this period. But when somebody mourns a personal loss, the time period is not an inherently sorrowful one. He himself is grieving, but there is nothing intrinsically wrong with that time period. As such, he is able to recite the Beracha of "She’hehiyanu." This distinction is made by Rav Eliyahu Mani (Baghdad-Hebron, 1818-1899), and already before him, by the Ma’amar Mordechai (Rav Mordechai Carmy, 1749-1825).
Therefore, the Shulhan Aruch’s ruling is correct, and during the Three Weeks, one should not place himself in a situation that would require the recitation of "She’hehiyanu."
Summary: During the Three Weeks, from Shiba Assar Be’Tammuz through Tisha B’Ab, one should not place himself in a situation that would require the recitation of the Beracha of "She’hehiyanu."