Sanhedrin2: 3
מֵת לוֹ מֵת, אֵינוֹ יוֹצֵא מִפֶּתַח פַּלְטְרִין שֶׁלּוֹ. רַבִּי יְהוּדָה אוֹמֵר: אִם רוֹצֶה לָצֵאת אַחַר הַמִּטָּה יוֹצֵא, שֶׁכֵּן מָצִינוּ בְדָוִד שֶׁיָּצָא אַחַר מִטָּתוֹ שֶׁל אַבְנֵר, שֶׁנֶּאֱמַר: ,,וְהַמֶּלֶךְ דָּוִד הֹלֵךְ אַחֲרֵי הַמִּטָּה”. אָמְרוּ לוֹ: לֹא הָיָה הַדָּבָר אֶלָּא לְפַיֵּס אֶת הָעָם. וּכְשֶׁמַּבְרִין אוֹתוֹ, כָּל הָעָם מְסֻבִּין עַל הָאָרֶץ וְהוּא מֵסֵּב עַל הַדַּרְגָּשׁ.
[If] someone [close] to him dies, he does not leave the entrance of his palace. R’ Yehudah says: If he wishes to go out after the bier he may go out, for so we find concerning David that he went out after the bier of Abner, as it is stated: And King Da-vid followed the bier. They said to him: This was only to placate the people. When they feed him the mourner’s meal, all the people sit on the floor and he sits on the dargash.