The third component of repentance (taubah) is the firmness of determination to never commit sin again.
This is volitional and can be done all the time. However, will power is needed for all endeavors. Similar is the matter here.
That is, one will have to make a firm determination to,
– bear whatever great difficulties or financial losses or physical hardships or public criticisms that may be encountered in following the commands of Allah and His Prophet (Allah bless him and grant him peace) and
-never to abandon the following of Allah and His messenger (Allah bless him and grant him peace).
If one does not have this determination then (it is evident that) he is not a seeker of Allah(‘s pleasure).’
Tahseel qasdus Sabeel, page 16
Sayyidi wa sanadi mufti Mohammad Taqi Usmani (Allah bless him with a healthy, long and productive life, Amin!) said,
‘I had some confusion about this component of taubah.
How can one guarantee about his own self (nafs) that he will never ever sin again in his future life?
In practical life it had happened that even after sincere repentance one succumbed to the same sinful temptations. Would this mean that the repentance done previously was deficient?
I inquired Shaikh Baba Najam Ahsan khalifa mujaz e suhbet of Hakim al Umma (Allah have mercy on them) about this.
He said,
‘It is at the moment of repentance one should have this conviction.
That is, one has to have firm determination at that moment of repenting never to commit this sinful act ever again.
As for the apprehension regarding the future one should ask Allah to facilitate this for him and try to the best of his ability. Doing this will, insha-Allah, keep him firm.