أَخْبَرَنَا أَحْمَدُ بْنُ يَحْيَى، قَالَ حَدَّثَنَا إِسْحَاقُ بْنُ مَنْصُورٍ، قَالَ حَدَّثَنَا دَاوُدُ، - يَعْنِي الطَّائِيَّ - عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، عَنْ جَبْرٍ، أَنَّهُ دَخَلَ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم عَلَى مَيِّتٍ فَبَكَى النِّسَاءُ فَقَالَ جَبْرٌ أَتَبْكِينَ مَا دَامَ رَسُولُ اللَّهِ صلى الله عليه وسلم جَالِسًا قَالَ ‏"‏ دَعْهُنَّ يَبْكِينَ مَا دَامَ بَيْنَهُنَّ فَإِذَا وَجَبَ فَلاَ تَبْكِيَنَّ بَاكِيَةٌ ‏"‏ ‏.‏

It was narrated from Jabr that he entered with the Messenger of Allah (PBUH) upon someone who was dying, and the women were weeping. Jabr said: "Are you weeping when the Messenger of Allah (PBUH) is sitting here?" He said: "Let them weep so long as he is among them, but if he dies no one should weep for him." Translation Not Available

Book Ref: Sunan An Nisai Book 25 Hadith 3195
Web Ref:  Sunan An Nisai Vol 1 Book 25 Hadith 3197