Narrated Ibn Umar: The Messenger of Allah ﷺ as saying: The dead is punished because of his family's weeping for him. When this was mentioned to Aishah, she said: Ibn Umar forgot and made a mistake. The Prophet ﷺ passed by grave and he said: The man in the grave is being punished while his family is weeping for him. She then recited: "No bearer of burdens can bear the burden of another. " The narrator Abu Muawiyyah said: (The Prophet passed) by the grave of a Jew.
Hadith Referenceسنن ابي داود / كتاب الجنائز / 3129
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:صحيح بخاري (3979، 3980، 3981) صحيح مسلم (932)
Benefits and Issues: Whether the deceased is a disbeliever or, hypothetically, even a Muslim, if he has made a bequest for wailing (noha) to be performed or is pleased with this act, then he will be punished due to his family members wailing over him. In this case, his being punished is not contrary to the aforementioned verse. However, if he was averse to this act and had forbidden it, and then those who remain after him commit this un-Islamic act, then he will be free from it. Therefore, believers should strictly instruct their heirs to refrain from wailing or lamentation. Hazrat Aisha (radi Allahu anha) considered this hadith to be contrary to this verse. That is why she interpreted it as mentioned above, whereas in reality, according to the aforementioned meaning, there is no contradiction between this hadith and the verse. Therefore, this hadith is also authentic in the manner in which Hazrat Ibn Umar (radi Allahu anhu) has narrated it.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 3129