Sahih al-Bukhari, Volume 9, Book 93, Hadith 474 (USC-MSA) ⓘ
Narrated Usama bin Zaid: We were with the Prophet when suddenly there came to him a messenger from one of his daughters who was asking him to come and see her son who was dying. The Prophet said (to the messenger), "Go back and tell her that whatever Allah takes is His, and whatever He gives is His, and everything with Him has a limited fixed term (in this world). So order her to be patient and hope for Allah's reward." But she sent the messenger to the Prophet again, swearing that he should come to her. So the Prophet got up, and so did Sa`d bin 'Ubada and Mu`adh bin Jabal (and went to her). When the child was brought to the Prophet his breath was disturbed in his chest as if it were in a water skin. On that the eyes of the Prophet became flooded with tears, whereupon Sa`d said to him, "O Allah's Messenger! What is this?" The Prophet said, "This is mercy which Allah has put in the heart of His slaves, and Allah bestows His mercy only on those of His slaves who are merciful (to others)."
حَدَّثَنَا أَبُو النُّعْمَانِ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ عَاصِمٍ الأَحْوَلِ، عَنْ أَبِي عُثْمَانَ النَّهْدِيِّ، عَنْ أُسَامَةَ بْنِ زَيْدٍ، قَالَ كُنَّا عِنْدَ النَّبِيِّ صلى الله عليه وسلم إِذْ جَاءَهُ رَسُولُ إِحْدَى بَنَاتِهِ يَدْعُوهُ إِلَى ابْنِهَا فِي الْمَوْتِ فَقَالَ النَّبِيُّ صلى الله عليه وسلم " ارْجِعْ فَأَخْبِرْهَا أَنَّ لِلَّهِ مَا أَخَذَ، وَلَهُ مَا أَعْطَى، وَكُلُّ شَىْءٍ عِنْدَهُ بِأَجَلٍ مُسَمًّى، فَمُرْهَا فَلْتَصْبِرْ وَلْتَحْتَسِبْ ". فَأَعَادَتِ الرَّسُولَ أَنَّهَا أَقْسَمَتْ لَتَأْتِيَنَّهَا، فَقَامَ النَّبِيُّ صلى الله عليه وسلم وَقَامَ مَعَهُ سَعْدُ بْنُ عُبَادَةَ وَمُعَاذُ بْنُ جَبَلٍ، فَدُفِعَ الصَّبِيُّ إِلَيْهِ وَنَفْسُهُ تَقَعْقَعُ كَأَنَّهَا فِي شَنٍّ فَفَاضَتْ عَيْنَاهُ فَقَالَ لَهُ سَعْدٌ يَا رَسُولَ اللَّهِ. قَالَ " هَذِهِ رَحْمَةٌ جَعَلَهَا اللَّهُ فِي قُلُوبِ عِبَادِهِ، وَإِنَّمَا يَرْحَمُ اللَّهُ مِنْ عِبَادِهِ الرُّحَمَاءَ ".
also referenced under: Book 97, Hadith 7 (In-Book) & Hadith 7377 (DarusSalam)