Repentance can be broken down into three elements. A genuine sorrow for having sinned against the holy God. This is godly sorrow. Esau wept over the consequences but there was no true repentance. Here it is very important to understand the difference between attrition and contrition.
Attrition has to do with turning away from sin, simply to escape punishment.
It is a repentance to escape punishment. A good example is found in Joshua chapter seven, when Achan confessed his sin when he was caught, it was a repentance to avoid punishment, but God is not mocked, so he put Achan to death. Contrition has to do with a broken and a contrite heart, which is genuine godly sorrow, found in Psalm 51. This has to do with your Will and purpose of forsaking sin and to walk in obedience to Christ Jesus. No one can even repent unless they hear the Word of God first, as God is the initiator of salvation.