Umm Atiya reported,

When the verse was revealed, "They will pledge allegiance to you on the condition that they will not associate anything with Allah" and "and will not disobey you in what is right" [Mumtahanah 60:12], she said that wailing over the dead was part of what was forbidden.She said, "I said, 'Messenger of Allah, except for the family of so-and-so, for they assisted me in mourning during the days of ignorance, so I must reciprocate and assist them.'"The Messenger of Allah ﷺ replied, "Except for the family of so-and-so."

Muslim 2165

Sahih

و حدثنا أبو بكر بن أبي شيبة وزهير بن حرب وإسحق بن إبراهيم جميعا عن أبي معاوية قال زهير حدثنا محمد بن خازم حدثنا عاصم عن حفصة

عن أم عطية قالت

لما نزلت هذه الآية {يبايعنك على أن لا يشركن بالله شيئا} {ولا يعصينك في معروف} قالت كان منه النياحة قالت فقلت يا رسول الله إلا آل فلان فإنهم كانوا أسعدوني في الجاهلية فلا بد لي من أن أسعدهم فقال رسول الله ﷺ إلا آل فلان

مسلم 2165صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Funerals
Chapter
Strictness regarding wailing
Numbering
Darussalam 2165
Muslim 2165