Huzaifa bin Yaman reported,

The Messenger of Allah ﷺ said, "There was a man among those who came before you who thought poorly of his own deeds. When death drew near, he said to his family, 'When I die, burn me, then grind me to dust, then scatter me in the sea, for if Allah has power over me, He will not forgive me.'So Allah عز وجل commanded the angels, and they took hold of his soul. Allah said to him, 'What drove you to do what you did?'He replied, 'My Lord, I did it only out of fear of You.'So Allah forgave him."

Nasai 2082

Sahih

أخبرنا إسحق بن إبراهيم قال حدثنا جرير عن منصور عن ربعي

عن حذيفة

عن رسول الله ﷺ قال كان رجل ممن كان قبلكم يسيء الظن بعمله فلما حضرته الوفاة قال لأهله إذا أنا مت فأحرقوني ثم اطحنوني ثم اذروني في البحر فإن الله إن يقدر علي لم يغفر لي قال فأمر الله عز وجل الملائكة فتلقت روحه قال له ما حملك على ما فعلت قال يا رب ما فعلت إلا من مخافتك فغفر الله له

النسائي 2082صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Funerals
Chapter
Souls of the believers
Numbering
Darussalam 2082
Nasai 2082