When Tempted
Satan cannot make you do anything you do not agree to do. He has to deceive you into agreeing with what he wants you to do. So, the first line of defence is your rejecting what he offers. When you are attacked ask The Holy Spirit if you are being attacked from within you or outside of you. It attacked from within you then deliverance is needed. If attacked from outside of you then cast it out in Jesus Name to the abyss.
When you are tempted and feel you need deliverance use the following framework (The Five Steps to freedom):
As it is a battle of kings you address the king (Satan).
Give the sin, area of moral weakness, circumstance, problem, event or situation to Jesus to be lord of,
Forgive all who have offended you including yourself, repent of bitterness and root of bitterness any wrong emotions or attitudes in you towards others whether you know of them or not as well as any sins you are bringing to Jesus,
Command Satan to go in Jesus’ Name as he no longer has a right to these areas as they now belong to Jesus,
In Jesus Name command healing and restoration of all the damage Satan did to you,
Ask Jesus to send The Holy Spirit to fill you replacing all the demons that have left to and anoint you as necessary to serve Jesus.
If there is no need for deliverance then tell any demon attacking you that you belong to Jesus and to go to the abyss in Jesus’ Name.
Whenever I get a wrong thought (of pride or otherwise), sensation, feeling or emotion, I command the demons behind it to leave and go to the abyss in Jesus’ Name.
In summary:
If the thought is from God, you obey it.
If the thought is from you ensure it is given to God or dealt with as He tells you to.
If the thought is from Satan, reject it after determining if deliverance is needed (from a demon inside of you) or just casting out of the demon is required (in respect of a demon outside of you) then do what you need to cast Him to the Abyss in Jesus Name.