Al-Harith bin al-Khazraj narrates from his father: I heard the Prophet (peace and blessings be upon him) say: (The narrator says:) "The Prophet (peace and blessings be upon him) saw the Angel of Death at the head of a man from the Ansar and said: 'O Angel of Death! Be gentle with my companion, for he is a believer.' The Angel of Death said: 'Be at ease and let your eyes be cooled. Know that I am gentle with every believer. O Muhammad, know that when I take the soul of a human being and someone from his family cries out in wailing, I stand in the doorway with his soul with me, and I ask: Who is this person? By Allah, we have not wronged him, we have not taken his soul before his appointed time, nor have we hastened ahead of his decreed measure, so what sin is ours in taking his soul? If you are pleased with what Allah Almighty has decreed, you will be rewarded, and if you grieve and are displeased, a burden will fall upon you. No reproach can be made against us in this matter, for we must keep coming to you time after time, so be careful, be careful! O Muhammad (peace and blessings be upon him)! Every household, whether its dwelling is made of hair or of clay, whether it belongs to a righteous person or a sinner, whether it is on soft ground or on a mountain, I go round every household daily, to the point that I know their young and their old better than they know themselves. By Allah, O Muhammad (peace and blessings be upon him)! If I intended to take the soul of a fly, I would not have the power to do so until Allah Almighty gives permission to take its soul.'"
Ja'far bin Muhammad (perhaps this refers to Imam Ja'far al-Sadiq) says: It has reached me that the Angel of Death goes round to people's homes at the times of the prayers, and when, near death, he finds someone who used to perform the prayers regularly, the Angel of Death comes close to him and Satan is driven away from that person, and the Angel of Death prompts him to say 'La ilaha illallah Muhammadun Rasulullah' (There is no god but Allah, Muhammad is the Messenger of Allah). And that is a most excellent state.
Al-Tabarani recorded it in al-Mu'jam al-Kabir. Its chain contains Umar bin Shamir al-Ju'fi and al-Harith bin al-Khazraj; I have not found anyone who has given a biography of either of them. The remaining narrators of this narration are the narrators of the Sahih. Al-Bazzar recorded part of this narration up to the words: "Know that I am gentle with every believer."
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الجنائز / 3928