Urwa reported,

Ibn Umar's statement that the deceased is punished due to his family's weeping over him was mentioned in the presence of Ayesha. She said, "May Allah have mercy on Abu Abd al-Rahman. He heard something but did not retain it accurately. A Jewish funeral procession passed by the Messenger of Allah ﷺ while the people were weeping over the deceased, and he said, 'You are weeping while he is indeed being punished.'"

Azami 3576

Sahih

عن عروة قال

ذكر عند عائشة قول ابن عمر: الميت يعذب ببكاء أهله عليه، فقالت: رحم الله أبا عبد الرحمن، سمع فلم يحفظه، إنما مرت على رسول الله ﷺ جنازة يهودي، وهم يبكون عليه، فقال: أنتم تبكون وإنه ليعذب.

الأعظمي 3576صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Prohibition of wailing over the deceased, and permissibility of weeping and showing grief over him
Section
Ayesha's رضي الله عنها objection to Ibn Umar that the dead are punished for their family's weeping over them
Numbering
Jami al-Kamil 3576 (2nd edition)
Azami 3576