While repentance is a biblical command, it is not something that we have the power to do on our own. We do not have the strength to do it, nor the knowledge of how to do it. It is a work of the grace of God, motivated by His love for us. He knows how powerless we are, so He has made a way of escape.

1Co 10:13 There hath no temptation taken you but such as is common to man: but God is faithful, who will not suffer you to be tempted above that ye are able; but will with the temptation also make a way to escape, that ye may be able to bear it.
Confession and forgiveness are a part of repenting, but are not the whole of it. 1Jn 1:9 If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.
True biblical repentance is change, plain and simple; change of heart, change of mind, change of direction. Repenting is responding to God calling you away from things, not just sin, but even our own will, wants, wishes, and desires, into something better. He draws you, and empowers you to make the change. It is His idea, He is the one who initiates. Philipians 2:13 For it is God Who works in you, both to will and to do of His good pleasure. John 6:44 No one comes to me unless the Father who sent me draws him.
Repentance is a gift, because it isn’t mine in the first place, He gives it to me. 1Co 4:7 …What do you have that you did not receive? If then you received it, why do you boast as if you did not receive it?
When I respond to His drawing, which often happens long before I make any mistake or intentionally do something stupid, I am repenting. WHEN I mess up, then I confess. But we should be repenting before we even do the wrong thing.
Jas 1:14 But every man is tempted, when he is drawn away of his own lust, and enticed.
Jas 1:15 Then when lust hath conceived, it bringeth forth sin: and sin, when it is finished, bringeth forth death.
We don’t have to wait until we are in sin to repent. We don’t have to wait until after we have sinned to repent. We must wake up repenting, responding to Jesus drawing our attention to Himself. When temptation (which isn’t sin) begins to happen, I am mature enough to recognize that, and respond to Him bringing that to my attention, and put my attention back on Him where it belongs. If we, in response to His leading, keep our attention on Him, then we are walking and living in repentance.