The Messenger of Allah ﷺ said, "The deceased is punished due to his family's weeping over him."
أخبرنا سليمان بن سيف قال حدثنا يعقوب بن إبراهيم قال حدثنا أبي عن صالح عن ابن شهاب قال قال سالم سمعت عبد الله بن عمر يقول
قال رسول الله ﷺ يعذب الميت ببكاء أهله عليه
Sourcing, sahih. Tirmidhi reported it in the Book of Funerals, chapter on the dislike of weeping over the dead, hadith 1002, from the hadith of Yaqub bin Ibrahim bin Saad with this chain, and said, hasan sahih. It is also in Kubra, hadith 1977. Salih here is Ibn Kaysan. Muslim also reported it, hadith 927, from the hadith of Ibn Umar with this chain.