Abu Hurairah reported,

The Prophet ﷺ said, "A man wronged his own soul through excessive sin. When death drew near, he instructed his sons, 'When I die, burn my body, then grind my remains to powder, then scatter the dust on the wind into the sea. By Allah, if my Lord ever gets hold of me, He will punish me with a punishment He has inflicted on no one else.'So they did that to him.Then Allah said to the earth, 'Return what you have taken,' and there he was, standing.Allah asked him, 'What drove you to do what you did?'He answered, 'Fear of You, my Lord,' or he said, 'Dread of You.'So Allah forgave him for that."

Azami 11417

Sahih

عن أبي هريرة

عن النبي ﷺ قال: أسرف رجل على نفسه، فلما حضره الموت أوصى بنيه فقال: إذا أنا مت فأحرقوني، ثم اسحقوني، ثم ذروني في الريح في البحر، فوالله لئن قدر علي ربي ليعذبني عذابا ما عذبه به أحدا، قال: ففعلوا ذلك به، فقال للأرض: أدي ما أخذت، فإذا هو قائم، فقال له: ما حملك على ما صنعت؟ فقال: خشيتك يا رب، أو قال: مخافتك فغفر له بذلك.

الأعظمي 11417صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Repentance and seeking forgiveness
Chapter
Comprehensive and general supplications
Section
Regarding one who feared Allah's punishment and ordered his body burned after death, not knowing that Allah is Forgiving and Merciful
Numbering
Jami al-Kamil 11417 (2nd edition)
Azami 11417