عَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ قَالَ: سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسلم يَقُول: «من نِيحَ عَلَيْهِ فَإِنَّهُ يُعَذَّبُ بِمَا نِيحَ عَلَيْهِ يَوْم الْقِيَامَة»
Translation

Abu Huraira reported God’s messenger as saying, “When the thong of someone’s sandal breaks he should say, ‘We belong to God and to Him do we return,' for it is one of the calamities.”