It is narrated from 'Umrah that she heard from 'Aisha (may Allah be pleased with her). She was told that Abdullah bin 'Umar says that the deceased is punished because of the weeping of his family members. 'Aisha (may Allah be pleased with her) said: He has not lied, but he has made a mistake. In fact, the Messenger of Allah (ﷺ) passed by a Jewish woman while her family was weeping over her, so he (ﷺ) said: They are weeping over her while she is being punished in her grave.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 556
Hadith Takhrijاخرجه البخارى، الجنائز، باب قول النبي صلی اللہ علیہ وسلم يـعـذب الـميـت ببعض بكاء ..... الخ (1289) ومسلم، الجنائز، باب الميت يعذب ببكاء اهله عليه (932)۔