Rabi’ah Asadi narrated : A man of the Ansars, Qarazah ibn Ka’b, died. The people wailed over him. Mughirah ibn Shu’bah climbed on the pulpit, praised and glorified Allah and said, “What has wailing to do in Islam? I had heard Allah’s Messenger (SAW) say If anyone is wailed over then he will be punished.”
[Ahmed18265, Bukhari 1291, Muslim 933]