As Salaamu Alaikum!
There are many of us who repent from a sin, then return the sin again, but repents again, then again returns to it (yet) again and so on. What is the ruling regarding the repentance?
Let us see the answer:
These repentances are all correct, because whenever someone commits a sin then repents to Allah Subhanahu wa Ta'ala from (having committed) it and fulfills the conditions for repentance - then Allah Subhanahu wa Ta'ala accepts his repentance. And if he falls into the sin again, then he should repent for a second time, and then a third time and a fourth time as Allaah (Subhaanahu wa Ta'aala) says:
{Say: "O 'Ibaadee (My slaves) who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allaah, verily, Allaah forgives all sins} - [Translation of the Meaning, Soorah az-Zumar, Aayah 53]
However, that which is important is the repentance must be sincere and truthful, and that he must be determined never to return to (committing) that sin (again): His repentance must not be an empty one - that he repents, yet in his heart he has the intention to return to that sin - such a repentance is not genuine.
However, if his repentance is genuine, and at the time of committing the sin he was determined never to return to (committing that) sin (again), then if he was to commit the (same) sin again, his first repentance will not be nullified, rather, his first repentance is correct, and whenever he commits a sin and repents, Allah Subhanahu wa Ta'ala will forgive him.
-Shaykh Ibn 'Uthaymeen I'laam al-Mu'aasireen bi-Fataawa Ibn 'Uthaymeen - Page 315