كتاب الجنائز
11  
The Book of Prayer - Funerals
(9)
Chapter: The deceased is tormented because of his family's crying for him
(9)
باب الْمَيِّتُ يُعَذَّبُ بِبُكَاءِ أَهْلِهِ عَلَيْهِ ‏
Sahih Muslim 931

Hisham b. 'Urwa narrated on the authority of his father that the saying of Ibn 'Umar, viz." The dead would be punished because of the lamentation of his family over him" was mentioned to 'A'isha. Upon this she said:

May Allah have mercy upon Abu 'Abd al-Rahman (the kunya of Ibn 'Umar) that he heard something but could not retain it (well). (The fact is) that the bier of a Jew passed before the Messenger of Allah (ﷺ) and (the members of his family) were waiting over him. Upon this he said: You are wailing and he is being punished.
وَحَدَّثَنَا خَلَفُ بْنُ هِشَامٍ، وَأَبُو الرَّبِيعِ الزَّهْرَانِيُّ، جَمِيعًا عَنْ حَمَّادٍ، - قَالَ خَلَفٌ حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، - عَنْ هِشَامِ بْنِ عُرْوَةَ، عَنْ أَبِيهِ، قَالَ ذُكِرَ عِنْدَ عَائِشَةَ قَوْلُ ابْنِ عُمَرَ الْمَيِّتُ يُعَذَّبُ بِبُكَاءِ أَهْلِهِ عَلَيْهِ ‏.‏ فَقَالَتْ رَحِمَ اللَّهُ أَبَا عَبْدِ الرَّحْمَنِ سَمِعَ شَيْئًا فَلَمْ يَحْفَظْهُ إِنَّمَا مَرَّتْ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم جَنَازَةُ يَهُودِيٍّ وَهُمْ يَبْكُونَ عَلَيْهِ فَقَالَ ‏ "‏ أَنْتُمْ تَبْكُونَ وَإِنَّهُ لَيُعَذَّبُ ‏"‏ ‏.‏
Reference : Sahih Muslim 931
In-book reference : Book 11, Hadith 31
USC-MSA web (English) reference : Book 4, Hadith 2026
  (deprecated numbering scheme)