I heard the Messenger of Allah ﷺ say, "The deceased is punished in his grave because of the wailing over him."
أخبرنا عمرو بن علي قال حدثنا يحيى قال حدثنا شعبة قال حدثنا قتادة عن سعيد بن المسيب عن ابن عمر
سمعت رسول الله ﷺ يقول الميت يعذب في قبره بالنياحة عليه
Bukhari narrated it in the Book of Funerals, chapter on what is disliked of wailing over the dead, no. 1292, and Muslim in the Book of Funerals, chapter on the deceased being punished for the weeping of his family over him, no. 927:17, from the hadith of Shubah through this route, and it is in Kubra, no. 1980.Yahya is Qattan.