Rebbe Nachman said that repentance helps for all sins.
True repentance involves never repeating the sin.
"You must return to the same place where you sinned, and put yourself in the same situation, and let the temptation stand before your eyes. When you can do this, and not repeat the sin, then you have broken the evil urge and have truly repented."
Sometimes Hashem does this for you. You are given the same event, like a gift, and you have the chance to behave differently. Sometimes this can happen more than once, because you are being tested. Once you've passed the test, that situation will not cause you any more problems.