How do you occupy your mind with God when there are thoughts there that won't go away????
The devil has access to our minds. That's why the "helmet of salvation" is part of our armour. We are also commanded to "take every thought captive to make it obedient to Christ." The mind of man is his battlefield. We may have a good, clean heart and the best of desires. Yet we may find out thoughts argue with what is in our hearts. So how do we do this in practice?
Any thought that you did not choose to think is from an evil spirit. So the answer is to command the evil spirit to release your mind and tell it not to return. It is also good to meditate on God's word so you are thinking that which is acceptable to God. I go a little further. I command the evil spirit to go to the Lord Jesus to be sent to the place reserved by God for it, bound with everlasting chains. I learned this from a friend. He told the devil, "You will run out of evil spirits before I give up casting them off the face of the earth!" The devil soon left him alone.
As believers, our minds are given to us by God to express what is in our hearts. If our minds are flooded with the enemy's thoughts, that is near impossible. We can get a free mind. It may take time. We did not get bound up in an instant and we will need to fight through for a time. The time it takes will depend on the degree of bondage and how diligent we are.
Once the mind is free, we need to renew it so that we think according to God's word. We need also to remember that Satan quoted scripture to Jesus in order to tempt Him. Satan will seek to condemn us for a sin, for example. We need to answer that accusation with God's word. There is no condemnation for those in Christ Jesus. And, they overcame him (Satan the Accuser) by the blood of the Lamb, their testimony and not loving their lives to the point of death.
Ephesians 6:12 tells what the battle is about. It is literally wrestling in Greek. The thing about wrestling is that we will get stronger as we keep it up. It's God's spiritual workout program. If we give into the enemy's thoughts, we will be weak not strong.
One of Satan's sneakiest tricks is discouragement. He will tell us that it's not working or that we are wasting our time. He will tell us that we are too far gone or we are too sinful. Such thoughts are lies. Keep fixed on Jesus. Satan may well be saying the truth - about our old self. We need to remember that Satan is pointing to a dead man while we are alive in Christ.
There is more to say on this, but if you've got this far, you've done well!