How do you repent, again and again, when you can't shake that sinful habit?
Here are some thoughts.
True repentance looks like honesty without trying to put a positive spin on your fault. Just be brutally honest about the sinful desires and thoughts you still see in yourself. Repentance takes this to God in prayer, first and foremost - see Psalm 51 and Romans 7:14-25.
True repentance doesn't make promises you convince yourself you can keep. Tying resolutions for perfect behavior in the future, to your present repentance, is a recipe for discouragement. Repentance is present and past oriented first. It does "strive for a new obedience" as WSC 87 says. But WCF 15:3 is really important: don't rely on your repenting to "fix" you. If I just think or say the right words or feel the right thing, then I'll be better, or God will fix me, we think.
True repentance trusts Jesus' atonement. Repentance admits your fault without excuse, and without trying to make it up in a way that minimizes the wrongdoing. Sometimes after losing the battle, we can do the post-mortem discussion as a way to convince ourselves we didn't really lose, or that it wasn't that bad, or that since we'll win the next game we can set this one aside. But only the blood of Jesus at the cross can atone for it. Trust that, and reject every way you try to atone for your sin yourself. 2 Cor. 7:9-11.
True repentance anchors in the Word. Satan will continue to try to get you to believe the lie that you're missing out on "the good life" by not giving in to this temptation. It's good to pour out your heart to God about this, admitting that your feelings, or some part of you, believe this lie. Then renounce it, fight it mentally, by using the Word. Many times what we know is right we will fight against in our sinful nature - Roman 7:14-25! Gotta fight back. We will often fail, but that doesn't mean the fight is over. Prov 24:16; Psalm 37:24; Micah 7:8. The fight is wearying and humbling, by God's design.
True repentance surrenders to His grace. It doesn't negotiate with God. If we aren't trusting His grace, we will either give up or convince ourselves by mental tricks and casuistry that we are succeeding on our own. But you have no righteousness to offer Him, to get Him to help you.
True repentance uses methods without relying on them. When you fall back into sin, it doesn't mean your method failed, necessarily. Your heart left the Lord for a time, but there may be much good to continue using/doing in past advice you've received from various folks. Jacob walked with a limp his whole life after wrestling with the angel. Keep wrestling - asking God to bless you in this area - and expect to walk with a limp. Which means, you'll need crutches - to compensate somehow. What does that look like, exactly? The heart is critical, of course, and everything flows from what it desires. But we also need outward structure to stay on the right track, because we are so prone to wander. Don't throw the crutches away because you fell.
True repentance knows, as a child of God in Christ, that He never accuses you to condemnation for your sinful failings. John 8:10-11. Sometimes for men it feels masculine in a good way to condemn yourself strongly, or have others condemn you, and use that as a brief and strong push to STOP IT! I think Col. 2:23 applies to that tactic: it's self-imposed will worship that doesn't really help fight sin. Instead, more truly and effectively, God accepts you where you are, right now. But He loves you enough to not want you to stay there. Your motivation isn't fear that He'll stop loving you, but wanting to honor the one who died to get you out of the gutter and clean you up.