Usama bin Zayd reported,

The daughter of the Prophet ﷺ sent word to him, "A son of mine has died, so come to us."He sent back greetings of peace and said, "Indeed, to Allah belongs what He takes and to Him belongs what He gives, and everything with Him has an appointed term. So let her be patient and seek reward."She then sent word to him again, beseeching him to come to her. So he set out, and with him were Saad bin Ubada, Muaz bin Jabal, Ubayy bin Kaab, Zayd bin Thabit, and some men. The child was lifted up to the Prophet ﷺ with his soul rattling in his chest. I think he said, "like a worn-out waterskin." The Prophet's ﷺ eyes overflowed with tears.Saad asked, "Messenger of Allah, what is this?"He replied, "This is mercy that Allah has placed in the hearts of His servants. Allah shows mercy only to those of His servants who are merciful."

Azami 3580

Sahih

عن أسامة بن زيد قال

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

الأعظمي 3580صحيح
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 3580 (2nd edition)
Azami 3580