'Abdullah bin 'Umar reported that Hafsa wept for 'Umar (when he was about to due). He ('Umar) said: Be quiet, my daughter. Don't you know that the Messenger of Allah (ﷺ) had said:" The dead is punished because of his family's weeping over it"?
Hadith ReferenceSahih Muslim / The Book of Prayer - Funerals / Hadith: 927