Q. If someone Hashem forbid, looses his father and at the same time receives from him a large inheritance, I remember that he has to recite Dayan Haemet for the death and Shecheyanu for the inheritance. Since both occurrences are simultaneous, which bracha does he recite first?

A. Mishna Berura (223: 6) rules that he first recites Dayan Haemes since this bracha is more obligatory than Sheheyanu, that some do not recite in this situation. Gesher Hachayim (18: 2; 3) maintains that since after the death one becomes an onen and is exempt at that initial stage from all positive mitzvos including brochos, but excluding Dayan Haemes, he would as is recite that one first.
However, Halichos Shlomo (23: 33) quotes that Horav S.Z Auerbach zt’l disagrees and opines he can recite Shecheyanu or Hatov Vehametiv immediately. Poskim also write that Shecheyanu should be recited in private (ibid,) Others assert that it should be recited only when the father reached a definite and propitious old age (Shulchan Hatahor ibid. 2).
Teshuvos Vehanhogos (2: 101) and other Poskim write that the common accepted tradition is not to recite Shecheyanu ot Hatov Vehametiv for a father’s inheritance.
Horav Shlomo Miller’s Shlit’a opinion is similar. The Rov suggested that one may comply with the blessing of Hatov Vehametiv by having intention to thank for the inheritance on the fourth brocho of Birchat Hamazon. (See also question 1504.)

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