2 Corinthians 10:3-5 “for though in the flesh we walk, we are not waging war according to the flesh. For the weapons of our warfare are not pertaining to the flesh, but pertaining to the natural ability of God towards the tearing down of fortresses; pulling down logics and every high thing lifting itself up against the experiential knowledge of God, and taking captive every thought into the obedience of Christ.”

How do you control the thoughts in your mind?

So often we struggle with thoughts that are of a “lacking in character” type, which flood our minds all day long. Perhaps they are thoughts that we will never do because ultimately our conscience would not permit such an action; nonetheless, we struggle with them. Perhaps we would do them if the opportunity presented itself knowing full well that we should not be involved with that type of action. Or perhaps they are thought that seem to be impossible to resist. They take over our minds, making us feel guilty and unworthy before God for even allowing such a thing in our minds, not to mention actually doing them.
We need to remember that our battle is not a battle of the flesh; we are not waging war against fleshly enemies. Our enemies are spiritual and affect our way of thinking. When it comes to how we deal with thoughts in our minds we need to realize that the thought is not a sin, or even a trespass. The thought in itself is nothing until we make it something.
In James 1:12 we are told how we are tempted by a desire to do something that lacks in character. First, the lust has to enter your mind, hence, a thought. Then, you have to accept the thought at your own. The thought is the bait. It is the means by which either your sin nature, Satan, or the world system seeks to gain control over your frame of mind. The bait intends to draw you out of your safe place, which is a place where your mind is framed on the things above where Christ is seated at the right hand of God. It does this by getting you to accept the thought and commit in your mind to perform that action. Once you commit to do the desire you have trespassed; offended God because you did not take the way of escape that He provides for you. A trespass will ultimately result in a sin when the opportunity arises for the act to be committed and is thus followed through.
Because these desires can be so strong, to defend ourselves we tend to fall into trying to put a law up against them to control them, rather than taking the way of escape that God has provided for us.

I should not be thinking such thoughts!

No! I refuse to think this way.

Or something along those lines comes up in our mind to combat the thought.

It may seem like this is a good way to deal with a bad thought, but the problem is we are setting a “do not” law upon ourselves and not applying the proper defense against the attack. That law will ultimately give the sin nature strength to overcome our mind. We can get so afraid of dealing with a thought that we focus on saying “No” rather than processing the thought correctly and bringing it into captivity with who we are in Christ.
The grace from God child trains us to deny ungodliness and worldly lust, in order that we should live with a saving frame of mind while manifesting godliness in this age, which is the present evil age. We live in a time where the manifestation of character that is unbecoming of any human is not only committed on a normal basis, but seeks to engulf all around it by involving them in the act by either getting them to participate or approve of such ungodly character. Part of this child training is learning how to deal with and properly process thoughts that enter into our minds. Remember, the thought is not a sin, the thought is not even a trespass. It is only the bait that is seeking to get us to bite so that we accept it as our own, which is trespassing against God because we did not take the way of escape, so that ultimately we will perform the act that lacks in character and fulfill the desire.
When a thought comes into our minds, we need to appropriately process the thought. We need to identify what type of thought it is. Is it a good one or a bad one? Sometimes to make the determination we need to develop the thought in our mind and consider the outcome of such an action. Other times there is no doubt that the thought is a bad one. Each thought that enters your mind should be considered and weighed as to its value. There is nothing wrong with this process, it does not make you unrighteous before God, as a matter of fact, by evaluating the thought you are then able to use the means that God has given you to overcome the enemy that is attacking you. If it is a bad thought, the next step is to identify which one of your spiritual enemies is causing the lust. We determine this by the type of desire. The better we know the methods of our enemies the fast we can identify the source of the temptation. At this point, do not say “NO!” to the thought; rather, take the proper way of escape. If it is a lust from the flesh, set your mind on the thing above. Remind yourself that you are dead to the sin nature and alive to God in Christ, count this to be true, yield your members to righteousness rather than unrighteousness. If the source is from Satan or one of his demons, put on the full armor from God. If the world system is the culprit, recognize that you have been crucified in Christ to the world system. Although you are in the world, you are not of the world. We may use the world, but not abuse it. This will prevent taking our love that is to be directed at the saints and directing it at the world system.
So the next time a bad thought comes into your mind, do not be afraid of it. Process it correctly, apply the proper defense against it and bring it into captivity. God has promised that He will not put on us more than we can handle but with all temptations, He gives us a way of escape so that we can bear up under them.

He does not say He will take them away, but will give us the strength we need to bear up under them until the attack subsides.
Colossian 3:1-3; Titus 2:11, 12; Galatians 1:4; Romans 6:1-3, 11, 13, 18; 7:9; Galatians 6:14; 1 John 2:15, 16; John 17:14; 1 Corinthians 7:31; 10:13; Ephesians 6:10-18