Sahih al-Bukhari, Hadith 1252 ⓘ
Narrated Anas bin Malik: The Prophet passed by a woman who was sitting and weeping beside a grave and said to her, "Fear Allah and be patient."
حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا ثَابِتٌ، عَنْ أَنَسِ بْنِ مَالِكٍ ـ رضى الله عنه ـ قَالَ مَرَّ النَّبِيُّ صلى الله عليه وسلم بِامْرَأَةٍ عِنْدَ قَبْرٍ وَهِيَ تَبْكِي فَقَالَ " اتَّقِي اللَّهَ وَاصْبِرِي " .
also referenced under: Book 23, Hadith 15 (In-Book) & Volume 2, Book 23, Hadith 343 (USC-MSA)