סימן נט סעיף ו
מֵת אָבִיו אוֹ אֶחָד מִשְּׁאָר קְרוֹבָיו, אוֹ אֲפִלּוּ אֵינוֹ קְרוֹבוֹ אֶלָּא שֶׁהוּא אָדָם כָּשֵׁר, וּמִכָּל שֶׁכֵּן תַּלְמִיד חָכָם שֶׁהוּא מִצְטַעֵר עָלָיו, מְבָרֵךְ בָּרוּךְ אַתָּה ה' אֱלֹקֵינוּ מֶלֶךְ הָעוֹלָם, דַּיַּן הָאֱמֶת. וְעַל שְׁאָר אָדָם שֶׁאֵינוֹ מִצְטַעֵר כָּל כָּךְ, אוֹמֵר בָּרוּךְ דַיַּן הָאֱמֶת בְּלֹא שֵׁם וּמַלְכוּת. אִם נִשְׁאַר מֵאָבִיו מָמוֹן לִירַשׁ, מְבָרֵךְ גַּם כֵּן שֶׁהֱחִיָּנוּ. וְאִם יֵשׁ לוֹ עוֹד אַחִים לַחֲלוֹק בּירֻשָׁה, אֲזַי בִּמְקוֹם בִּרְכַּת שֶׁהֱחִיָּנוּ מְבָרֵךְ הַטּוֹב וְהַמֵּטִיב.
Upon the death of a father or other relative, or even an unrelated, observant Jew, and certainly [on the death of] a Torah scholar whose death distresses us, we recite the berachah Baruch ata Adonoy Elokeinu melech ha'olam dayan ha'emes. On the death of a person whose demise does not cause as much anguish, Baruch dayan ha'emes should be said, omitting the Divine Name and Kingship. If a father leaves property to his son as an inheritance, the son also says the berachah Shehecheyanu. If there are other brothers who share the inheritance, then, instead of Shehecheyanu, he says Hatov vehameitiv.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)