Al-Harith bin al-Khazraj narrates from his father, Sayyiduna al-Khazraj (may Allah be pleased with him); he said: I heard the Messenger of Allah (peace and blessings be upon him) say this, when the Prophet (peace and blessings be upon him) saw the Angel of Death (peace be upon him) 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 (peace be upon him) said: "Be of good cheer and let your eye be comforted, and know that I am gentle with every believer. And know, O Muhammad, that when I take the soul of a son of Adam and someone from his family cries out, I stand in the house with his soul with me and say: 'What is this crying? By Allah, we did not wrong him, nor did we (take him) before his appointed term, nor did we hasten his decree, and we bear no blame in taking his soul. If you are content with what Allah has done, you will be rewarded; and if you grieve and are displeased, you will incur sin. We have no excuse (to offer) you, and we have to come to you again and again, so beware.' And O Muhammad, there is no household, whether it be a tent or a house of clay, on land or at sea, on plain ground or on a mountain, but I examine it every day and night, until I know their young and old better than they know themselves. By Allah, O Muhammad, if I wished to take the soul of a mosquito, I could not do so until Allah Himself gave permission for its soul to be taken." Ja'far (the narrator) said: It has reached me that he (the Angel of Death) examines them only at the times of prayer, and when he looks at the time of death, whoever used to guard the prayers, the angel draws near to him and drives Satan away from him, and the angel prompts him with 'La ilaha illallah, Muhammadun Rasulullah' (There is no god but Allah, Muhammad is the Messenger of Allah). And that is a tremendous state.
Hadith Referenceالمعجم الكبير للطبراني / باب الخاء / 4173