It was narrated from Hudhaifah that the Messenger of Allah said:
There was a man among those who came before you who thought badly of his deeds, so when death was approaching he said to his family: 'When I am dead, burn my body and grind up my bones, then scatter me in the sea, for if Allah gets hold of me, He will never forgive me.' But Allah commanded the angles to seize his soul. He said to him: 'What made you do what you did?' He said:: 'O Lord, I only did it because I feared You.' So Allah forgave him.