The Bible tells us to take every thought captive (2 Cor. 10:5) and “whatever is true, whatever is honorable, whatever is just, whatever is pure, whatever is lovely, whatever is commendable, if there is any excellence, if there is anything worthy of praise, think about these things. (Phil. 4:8). This acknowledges that this thinking thing is not automatic. It takes discipline and hard work. Given the nature of sin in the world and in our hearts, we need to know that walking with God is something we need to focus on all the time and to never let down our guard.
You mentioned that all of this sort of blind-sides you. Well, that’s normal. We’re in a war and the other side has snipers who are just waiting for us to drop our guard and relax for a few seconds. When we do, little Suzy comes dancing out, and drags us off (Prov. 5).
One of the fruits of the Spirit is perseverance. James says perseverance comes to us when we anticipate with joy the trials that will come our way (Jas 1:2-4). We anticipate them with joy when we are aggressive with them and say, “bring it on, I will blow you away.” And then when temptation comes, we triumph over them by running to God (Jas 4:8).
James also says that “But each person is tempted when he is lured and enticed by his own desire. Then desire when it has conceived gives birth to sin, and sin when it is fully grown brings forth death. Do not be deceived, my beloved brothers” (Jam 1:14-16). Some translations use the word lust instead of desire. But it really means the same thing. When our desires are not matched up with God’s desires, and they are enticed to go after them, we sin.
Our desires are aligned with God’s desires when we draw near to him and delight ourselves in him (Psa. 37:4). I envision the whole thing like this: First, we confess our sins so that we can be cleansed from all unrighteousness (1 Jn. 1:9). This puts us in a right standing with God and he lifts us up and puts us on his lap. We snuggle up against him and relax in the joy of his presence. Then, when we’re all snuggly and warm, something that we desire to have or own for ourselves apart from God’s blessing (slinky Suzy, too many warm doughnuts, a quick buck, etc.) prances by. We struggle against God, reject his invitation to continued fellowship, and jump down to chase after whatever desire has our attention and as a result we sin. God chastises us (Heb. 12:6ff). We feel terrible, come back to God, confessing our sin, and the whole process begins again.
The lust or desire is really that we want what we want, not what God wants. We want to look too long. We want to pretend we are getting what we’re looking at. We want to feel good, so we do what we do. In the end, we do what we do because we want what we want. All of it comes from a nasty dirty heart (Luke 6:45). And it isn’t related to what God wants to give us.
The whole situation is sinful. We need to repent down to the ground and continue to repent. Confession is to admit our wrong. Repentance is to confess and then do what is right. And Spiritual growth consists of learning to walk with God consistently and continually, always growing in our trust that he wants what is best for us and is providing that best as we wait on him and rest in him.
The Bible also calls this circumcising our hearts (Deut. 10:16; Jer. 4:4). We can’t ever put it back once its cut off. So cut off your desires and trust God. It also calls it taking up your cross and following Jesus (Mt. 16:24; Lk. 9:23). Taking up your cross involves counting yourself as dead and trusting God. Dead men can’t do whatever they want. Neither can Christians. You’ve been bought with a price (Jesus died), you’ve died in Christ, and because he lives, you can live a new life (Rom. 6:8; 2 Cor. 5:15).
One rule of thumb about lust, related to your situation, would be would you want men looking at your wife like you are looking at slinky Suzy? or thinking about her like that? What about your daughter? If you don’t want others thinking like that, then don’t you think like that either. If your answer is ‘yes’ to any of these questions, we have more to talk about.
I hope this helps.