The Prophet ﷺ said, "When a believer is on the verge of death, the angels of mercy come to him with white silk and say, 'Come out, pleased and pleasing, to the mercy of Allah, to fragrance, and to a Lord who is not angry.' So the soul departs like the most fragrant scent of musk, and the angels pass it from one to another until they bring it to the gate of heaven, where they say, 'How sweet is this fragrance that has come to you from the earth.' Then they bring it to the souls of the believers, who rejoice over it more than any one of you would over the return of an absent loved one. They ask the soul, 'What did so-and-so do? What did so-and-so do?' Then they say, 'Leave him be, for he was preoccupied with the cares of this world.' When the soul says, 'Has he not come to you?' they reply, 'He has been taken to his mother, the Pit.'As for the disbeliever, when death approaches him, the angels of punishment come to him with sackcloth and say, 'Come out, displeased and displeasing, to the punishment of Allah .' So the soul departs like the foulest stench of a corpse, and they bring it to the gate of the earth, where they say, 'How foul is this stench,' until they bring it to the souls of the disbelievers."
أخبرنا عبيد الله بن سعيد قال حدثنا معاذ بن هشام قال حدثني أبي عن قتادة عن قسامة بن زهير
أن النبي ﷺ قال إذا حضر المؤمن أتته ملائكة الرحمة بحريرة بيضاء فيقولون اخرجي راضية مرضيا عنك إلى روح الله وريحان ورب غير غضبان فتخرج كأطيب ريح المسك حتى أنه ليناوله بعضهم بعضا حتى يأتون به باب السماء فيقولون ما أطيب هذه الريح التي جاءتكم من الأرض فيأتون به أرواح المؤمنين فلهم أشد فرحا به من أحدكم بغائبه يقدم عليه فيسألونه ماذا فعل فلان ماذا فعل فلان فيقولون دعوه فإنه كان في غم الدنيا فإذا قال أما أتاكم قالوا ذهب به إلى أمه الهاوية وإن الكافر إذا احتضر أتته ملائكة العذاب بمسح فيقولون اخرجي ساخطة مسخوطا عليك إلى عذاب الله عز وجل فتخرج كأنتن ريح جيفة حتى يأتون به باب الأرض فيقولون ما أنتن هذه الريح حتى يأتون به أرواح الكفار
[Sahih]. Bayhaqi reported it in Ithbat Azab Qabr, no. 34 (in my edition), from the hadith of Muaz bin Hisham, with this chain, and it is also found in al-Kubra, no. 1959. Ibn Hibban graded it sahih, no. 733, as did Hakim, 1/352-353, and Dhahabi agreed with him. It has corroborating narrations in Muslim, no. 75/2872, and in Bayhaqi's Ithbat Azab Qabr, no. 19 and 33, among others.