(6) باب الْبُكَاءِ عَلَى الْمَيِّتِ
Usama b. Zaid reported:
While we were with the Messenger of Allah (ﷺ), one of his daughters sent to him (the Messenger) to call him and inform him that her child or her son was dying. The Messenger of Allah (ﷺ) told the messenger to go back and tell her that what Allah had taken belonged to Him, and to him belonged what He granted; and He has an appointed time for everything. So you (the messenger) order her to show endurance and seek reward from Allah. The messenger came back and said: She adjures him to come to her. He got up to go accompanied by Sa'd b. 'Ubada, Mu'adh b. Jabal, and I also went along with them. The child was lifted to him and his soul was feeling as restless as if it was in an old (waterskin). His (Prophet's) eyes welled up with tears. Sa'd said: What is this, Messenger of Allah? He replied: This is compassion which Allah has placed in the hearts of His servants, and God shows compassion only to those of His servants who are compassionate.
Reference: Sahih Muslim 923 a
In-book reference: Book 11, Hadith 13
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 2008