I've come to realize a formula that I believe always works in overcoming sin. Many people hate "X Steps" and related formulas, because many sins are so complicated. And that's fair enough, complications do exist, but when those complications boil down to flesh wants its way now, I think this formula works.
- Acknowledge the sin. 1 John 1:9 reads, "If we confess our sins, he is faithful and just and will forgive us our sins and purify us from all unrighteousness." So start with admitting that what you're going through, the temptation and the sin itself, is wrong, and it's something that you're struggling with.
- Approach Him and reconcile. Go straight to Him. In the book of Genesis, when Adam and Eve sinned, their first consequence of sin was they were so ashamed that they hid from God. This is therefore the most important reason why sin is so harmful and hurtful. When God found Adam and Eve, He provided clothing for their nakedness. He did it by killing an animal. Jesus already died for your sins, you must reapproach Him without shame and let His glory purify you simply by His presence. It is His presence that purifies you and teaches you and causes you to crave righteousness.
- Ask Him to help you. He loves you so much more than to leave you stuck with just forgiveness of sin. He wants to participate in helping you overcome! It could be as simple as helping you move on. But He does want to help! So ask! And, along the same lines, ask Him for wisdom. Perhaps wisdom can help you cut off what causes temptation to begin with. One time in my successful but chronic battle against sin that went on for multiple nights I heard Him say, "Jon, you've been struggling with this for three nights now, and you never once asked Me to help you." So I asked Him to help me, and a wave of heat came over me and I slept like a baby all the way through till the morning.
- Obey. Do what He tells you to do, and do not do what He is telling you not to do.
The thing about this formula is it is generally sequential, and every step must be tackled, in sequence, although #3 and #4 might coincide. See, many people go straight to #4, and immediately fail, and immediately convince themselves that living in freedom is impossible. Obedience without first acknowledging your weaknesses and relying on His presence and His participation in empowering you to overcome will result in you merely operating out of your flesh, which is guaranteed to fail.