The Messenger of Allah ﷺ said, "There is no deceased person whose mourner stands up wailing, 'Oh, my mountain! Oh, my master!' or anything similar, except that two angels are assigned to him, striking him and saying, 'Were you really like this?'"
حدثنا علي بن حجر أخبرنا محمد بن عمار حدثني أسيد بن أبي أسيد أن موسى بن
أن رسول الله ﷺ قال ما من ميت يموت فيقوم باكيه فيقول وا جبلاه وا سيداه أو نحو ذلك إلا وكل به ملكان يلهزانه أهكذا كنت
No references are available.
[Its chain of transmission is hasan]. Ibn Majah also reported it in the Book of Funerals, chapter on what has been said about the deceased being punished for what is wailed over him, hadith no. 1594, from the hadith of Usayd, similarly.