The Prophet Muhammad said
God is more joyful at the repentance of someone when he turns to Him in repentance than one of you would be if he were riding his camel in the wilderness, and it runs away from him, carrying his food and drink, so that he loses all hope of getting it back. He comes to a tree and lies down in its shade (awaiting death), for he has lost all hope of finding his camel. Then, while he is in that state (of desperation), suddenly it is there before him! So he seizes its halter and cries out from the depth of his joy, “O God, You are my servant and I am Your Lord!” His mistake comes from the intensity of his joy
Narrated in Saheeh Muslim, #2747, and Saheeh Al-Bukhari, #6309