The Prophet ﷺ came to one of his daughters as she lay in the throes of death. He took her and placed her in his lap until she passed away. His eyes filled with tears, and Umm Ayman wept.She was asked, "Are you weeping in the presence of the Messenger of Allah ﷺ?"She replied, "Should I not weep when the Messenger of Allah ﷺ himself is weeping?"He said, "I am not weeping out of grief. This is mercy. The believer's soul departs from between his sides while he is praising Allah ."
حدثنا معاوية بن عمرو قال حدثنا أبو إسحاق عن عطاء بن السائب عن عكرمة
جاء النبي ﷺ إلى بعض بناته وهي في السوق فأخذها ووضعها في حجره حتى قبضت فدمعت عيناه فبكت أم أيمن فقيل لها أتبكين عند رسول الله ﷺ فقالت ألا أبكي ورسول الله ﷺ يبكي قال إني لم أبك وهذه رحمة إن المؤمن تخرج نفسه من بين جنبيه وهو يحمد الله عز وجل
Its chain of transmission is hasan, if not sahih. Abu Ishaq here is Fazari, and I am inclined to think he heard from Ata bin Saaib before the latter's mind became confused, though I have not found a citation stating this explicitly. Something similar to it will come at 2475 through the narration of Thawri from Abu Ishaq, and Thawri heard from him in his early period, so it is sahih.The hadith appears in Majma al-Zawaid 3:18 in abridged form, attributed to Bazzar, who found fault with it because of Ata, as though he had not seen it in the Musnad.Umm Ayman was the nurse who raised the Messenger of Allah, see 2127 and 2130.Al-sawq, with the seen vowelled as fatha, means the pulling out, as though the soul is being driven out to leave the body.