"Blessed and holy is he (and she) that hath part in the first resurrection: on such the second death hath no power, but they shall be priests of God and of Christ, and shall reign with Him a thousand years. And when the thousand years are expired, satan shall be loosed out of his prison." (Revelation 20:6-7, emphasis mine)
Without waxing eschatological, I'd like to take a look at just what happens when we encounter things that crop up either when we least expect them or after we thought we'd dealt the death-blow to that recurring habit or hangup. And with reference to the passage from Revelation, who knows why the devil is going to be let loose? I think it has something to do with an active opposition to our free will and God allowing those on the earth to encounter struggle and hardship so as to overcome by His power. Much like what happens today, I might add. And it wasn't until relatively recently that I began to see the epic battle scenes of Revelation as something that, I would say, most of humanity is not going to be privy to viewing while they're taking place. Oh, they'll feel the effects sure, but to view something like that would be mind blowing and more-than-creepy. I digress:
"In the day of prosperity be joyful, but in the day of adversity (that's what satan means, by the way: "adversary"--in Hebrew) consider: God hath set the one over against the other, to the end that man should find nothing after Him." (Ecclesiastes 7:14)
One question before we begin. How many of us (myself included) really take the time to enjoy those "times of refreshing" while we are experiencing them? Food for thought. This isn't to say that God's the one who causes evil things and temptation to happen—He allows them. And to a great degree, allows what we allow.
"I will behave myself wisely in a perfect way. O when wilt Thou come unto me? I will walk within my house with a perfect heart. I will set no wicked thing before mine eyes..." (Psalm 101:2-3a)
This isn't a call to an irrational prudery or a self-righteousness that denies the power of God at work when we experience the tempation to sin. It's about guarding the influences both spiritual and natural that would seek to take our attention away from God. I feel that most people would read the above passage and relate it only to issues of lust. And, there, it certainly applies. But what about other things of garden-variety coveting? Whatever it is that we choose to look at and consider and observe--from new patio furniture to that extra piece of pie to another person to any thought, however innocent-seeming--that seeks to divert our attention from God will indeed do that very thing down the road. This is why we take our thoughts to Him.
I believe that sin happens with reference to God first. The moment we got out of touch with Him, whether we felt it or not (when we don't feel it, is that a sort-of mercy--or blindness?), is when we got on the track that leads us down to where we end in falling down and needing forgiveness.
"for whatsoever is not of faith is sin." (Romans 14:23)
"Watch ye and pray, lest ye enter into temptation. The spirit truly is ready, but the flesh is weak." (Mark 14:38)
Recrudescence is a medical term that refers to a condition or disease that breaks out anew after a period of dormancy or remission. Paul asked through his desperation: "O wretched man that I am! who shall deliver me from the body of this death?" (Romans 7:24) He encountered the same thing as do we all: the recurring temptation to sin in whichever way is unique to us. The good news is that our spirit has been recreated by the Holy Spirit upon believing in Jesus. This is part and parcel of the Gospel of Jesus Christ. You are not who you once were. Your spirit is now made of the same stuff as is Jesus'--mind blowing. One of the simplest and subtlest ways in which the devil seeks to derail us from a path of holy living, is to get us into unforgiveness. I would have to say that a lot of what we encounter that conspires to get us to "lose control", so to speak, is in order to get us into unforgiveness. The "crude" part of the word is the same, etymologically, as raw–bloody. Asepsis is when the blood is made pure of a poison that was infecting it. When we forgive, be it ourselves or others, it's like the exhalation of all the bad stuff that we don't need. And all of that is made possible by the blood that Jesus shed for us on Calvary. All our sin is already forgiven.
Here's the thing. While the easy answer of "just don't sin" doesn't really apply across-the-board with many people who struggle with recurring habits (best to not even say it), the solution for each of us is within reach. It starts with Jesus and ends with Him too. Find it for yourself and don't be afraid to make mistakes.
"And almost all things are by the law purged with blood; and without shedding of blood is no remission." (Hebrews 9:22)
"For if ye live after the flesh, ye shall die: but if ye through the Spirit do mortify the deeds of the body, ye shall live. For as many as are led by the Spirit of God, they are the sons (and daughters) of God." (Romans 8:13, 14) You can do it.