كتاب الجنائز
11  
The Book of Prayer - Funerals
(8)
Chapter: Patience in bearing calamity when it first strikes
(8)
باب فِي الصَّبْرِ عَلَى الْمُصِيبَةِ عِنْدَ الصَّدْمَةِ الأُولَى ‏
Sahih Muslim 926 b

Anas b. Malik reported that Allah's Messenger (ﷺ) came to a woman who had been weeping for her (dead) child, and said to her:

Fear Allah and show endurance. She (not recognising him) said: You have not been afflicted as I have been. When he (the Holy Prophet) had departed, it was said to her that he was the Messenger of Allah (ﷺ), she was mortally shocked. She came to his door and she did not find doorkeepers at his door. She said: Messenger of Allah. I did not recognise you. He said: Endurance is to be shown at first blow, or at the first blow.
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا عُثْمَانُ بْنُ عُمَرَ، أَخْبَرَنَا شُعْبَةُ، عَنْ ثَابِتٍ الْبُنَانِيِّ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم أَتَى عَلَى امْرَأَةٍ تَبْكِي عَلَى صَبِيٍّ لَهَا فَقَالَ لَهَا ‏"‏ اتَّقِي اللَّهَ وَاصْبِرِي ‏"‏ ‏.‏ فَقَالَتْ وَمَا تُبَالِي بِمُصِيبَتِي ‏.‏ فَلَمَّا ذَهَبَ قِيلَ لَهَا إِنَّهُ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏.‏ فَأَخَذَهَا مِثْلُ الْمَوْتِ فَأَتَتْ بَابَهُ فَلَمْ تَجِدْ عَلَى بَابِهِ بَوَّابِينَ فَقَالَتْ يَا رَسُولَ اللَّهِ لَمْ أَعْرِفْكَ ‏.‏ فَقَالَ ‏"‏ إِنَّمَا الصَّبْرُ عِنْدَ أَوَّلِ صَدْمَةٍ ‏"‏ ‏.‏ أَوْ قَالَ ‏"‏ عِنْدَ أَوَّلِ الصَّدْمَةِ ‏"‏ ‏.‏
Reference : Sahih Muslim 926b
In-book reference : Book 11, Hadith 18
USC-MSA web (English) reference : Book 4, Hadith 2013
  (deprecated numbering scheme)