It is narrated from Sayyiduna Imran bin Husayn (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Indeed, Allah, the Mighty and Majestic, punishes the deceased because of his family's wailing over him." A man said: A man dies in Khurasan and people wail over him here; will he be punished? Sayyiduna Imran (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) spoke the truth, and you have denied (it).
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15502