Abdullah bin Umar reported,

Saad bin Ubada fell seriously ill, so the Prophet ﷺ came to visit him along with Abdul-Rahman bin Awf, Saad bin Abu Waqqas, and Abdullah bin Masud. When he entered and found him surrounded by his family in a state of unconsciousness, he asked, "Has he passed away?"They replied, "No, Messenger of Allah."The Prophet ﷺ then wept, and when the people saw the Prophet ﷺ weeping, they wept too. He said, "Do you not hear? Allah does not punish for the tears of the eye, nor for the grief of the heart, but He punishes for this," and he pointed to his tongue, "or shows mercy. And indeed, the deceased is punished because of his family's wailing over him."

Azami 3581

Sahih

عن عبد الله بن عمر قال

اشتكى سعد بن عبادة شكوى له، فأتاه النبي ﷺ يعوده مع عبد الرحمن بن عوف وسعد بن أبي وقاص وعبد الله بن مسعود، فلما دخل عليه فوجده في غاشية أهله فقال: قد قضى؟ قالوا: لا يا رسول الله: فبكى النبي ﷺ، فلما رأى القوم بكاءالنبي ﷺ بكوا. فقال: ألا تسمعون؟ إن الله لا يعذب بدمع العين، وبحزن القلب، ولكن يعذب بهذا- وأشار إلى لسانه- أو يرحم، وإن الميت يعذب ببكاء أهله عليه.

الأعظمي 3581صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Prohibition of wailing over the deceased, and permissibility of weeping and showing grief over him
Section
Permissibility of weeping over the deceased and showing grief for them
Numbering
Jami al-Kamil 3581 (2nd edition)
Azami 3581