Shaarei Teshuvah
And behold that there are many levels of repentance. It is true that you will find forgiveness for any repentance. However the soul will only find complete purification - to be as if the iniquities never had been - when a person purifies his heart and prepares his spirit, as will be explained. And so is it written (Psalms 32:2), "Happy is the man whom the Lord does not hold guilty, and in whose spirit there is no deceit." And it is like the matter of a garment that needs washing: For a little washing will be effective to remove its soiling. However, it will [only] whiten according to the amount of washing. And so is it written there (Psalms 51:4), "Wash me thoroughly of my iniquity." And the soul will be washed from iniquity according to how you wash its heart, as it is stated (Jeremiah 4:14), "Wash your heart clean of wickedness, O Jerusalem." And our Rabbis, may their memory be blessed, said (Avodah Zarah 19a), "'Happy is the man who fears the Lord' (Psalms 112:1) - when he is still a man." This means to say that the most elevated repentance of a man is in the days of his youth - [when] he overcomes his impulse when his strength is still with him. However any repentance is effective, as it is stated (Psalms 90:3), "You return man to dust; You said, 'Return you mortals!'" And our Rabbis, may their memory be blessed, said (Yerushalmi Chagigah 2:1), "Until the soul turns to dust."
Orchot Tzadikim
Now there are many steps in the upward path of repentance, and according to these steps a man draws nearer to God, Blessed be He. Never can a soul reach perfect purity so that the sins will be as though they had never been, except after a man has purified his heart. It is like a soiled garment — if he launders it a little, the dirt may disappear but a stain remains, and only after much laundering it becomes completely white. And thus it is written, "Wash me thoroughly from mine iniquity" (Ps. 51:4). Therefore, you must wash away the sin from your heart, as it is said, "O Jerusalem, wash thy heart from wickedness" (Jer. 4:14).