It is narrated from Hazrat Jabir (may Allah be pleased with him) that I went with the Prophet Muhammad (peace and blessings be upon him) to attend the funeral of an Ansari. His family was weeping over him. I said to them, "Are you weeping in the presence of the Prophet Muhammad (peace and blessings be upon him)?" The Prophet Muhammad (peace and blessings be upon him) said, "Let them be. As long as he is with them, they will weep over him, and when he is buried in the grave, then they will not weep."
Hadith Referenceمسند احمد / مسند الأنصار رضي الله عنهم / 23751
Hadith Gradingحکم دارالسلام:حديث صحيح، جابر بن عتيك هذا لم نتبينه