The Prophet ﷺ said, "The deceased is punished because of his family's weeping over him."Ayesha said, "May Allah have mercy on him. He did not lie, but he was mistaken. The Messenger of Allah ﷺ only said this concerning a man who died as a Jew, 'The deceased is being punished while his family is weeping over him.'"
حدثنا قتيبة حدثنا عباد بن عباد المهلبي عن محمد بن عمرو عن يحيى بن عبد الرحمن
عن النبي ﷺ قال الميت يعذب ببكاء أهله عليه فقالت عائشة يرحمه الله لم يكذب ولكنه وهم إنما قال رسول الله ﷺ لرجل مات يهوديا إن الميت ليعذب وإن أهله ليبكون عليه
Its isnad is hasan. Ahmad (2/31) also narrated it, from the hadith of Muhammad bin Amr, with the same wording.On this topic there is also a narration from Ibn Abbas [Ahmad 1/237, 238, 335], Qurza bin Kaab [Tabarani in Kabir 19/39, 335, h: 82], Abu Hurairah [Nasai, h: 1860], Ibn Masud [Ibn Hibban, h: 792, and Hakim 2/336, with its basis found in Ibn Majah, h: 1571], and Usama bin Zayd [Bukhari, h: 1284, and Muslim, h: 923].