Long ago, my youth pastor told me that you can't keep a bird from flying over your head, but you can keep her from building a nest there. Think of that example when it comes to thoughts. It isn't wrong to think a wrong thought; it's wrong to dwell on or hold on to that wrong thought.
In one area pertaining to fear, I had to go back to kindergarten. I have been doing and continue to do this exercise that my parents taught me long ago. It's based on 2 Corinthians 10:5,
"We are destroying speculations and every lofty thing raised up against the knowledge of God, and we are taking every thought captive to the obedience of Jesus Christ."
When a thought of fear comes in, STOP. (Most of us make our first mistake here. We grab the thought turn it over, look at it, dwell on it and that's just the beginning of our troubles.) So, I STOP. Sometimes I don't remember right away and sometimes I do. But either way, when I do, I STOP.
Then, I say, either quietly to myself or out loud, "I take this thought captive to the obedience of Jesus Christ. It has raised itself again the knowledge of God."
If I've been toying with that thought for a while, sometimes I have to STOP multiple times and confess that Scripture a couple of times. Sometimes I have to repent - to tell God I'm sorry that I let worry and fear creep in again. Nobody's gonna show up at your door to do this for you. I've got to get a hold of the peace of God myself. I can't keep praying for deliverance for fear if I want to keep my pet fear thoughts in my pocket all the time. The Lord helped me to see this and is leading me to victory. Be encouraged. He will lead you to victory over fear.