Hazrat Abu Hurairah radiyallahu anhu narrates that Rasulullah sallallahu alaihi wasallam once said: “There were two men in the Bani Israeel who were close friends. One of them was a habitual sinner whilst the other exerted himself in acts of worship. The one exerting himself in worship would often see his friend involved in sin and would instruct him: “Refrain from sin”
One day he found him engaged in some sin and thus again instructed him: “Refrain from sin!” so the sinner replied: “Leave me to my Allah. Have you been appointed as a watchman over me?”
On this the worshipper said: “I swear by Allah, Allah will never forgive you and will never admit you into Jannat.”
Then both passed away and were presented in front of the Lord of the worlds. Allah said to the one who strived hard in worship: “Did you have any knowledge regarding me or do you have any control over what lies in my hands?” Allah then said to the sinner: “Go, enter into Jannat because of my mercy.”
Regarding the worshipper Allah commanded: “Take him into Jahannam.”
Hazrat Abu Hurairah radiyallahu anhu, commenting on this hadith says: “That worshipper uttered such a statement which destroyed both his dunya as well as his aakhirat.”
Abu Dawood, pg.329, vol.2)