Fix Your Thoughts on Jesus
When you are tempted, do whatever is necessary to turn your attention to something else. Satan can't get your attention when your mind is preoccupied with something else. That's why the Bible teaches us to fix our thoughts on Jesus (Hebrews 3:1) and to fill our minds with those things that are good and that deserve praise: things that are "true, noble, right, pure, lovely, and honorable." (Philippians 4:8 TEV) When we're serious about defeating temptation, we will manage our thoughts and monitor our media intake. Solomon, the wisest man who ever lived warned: "Be careful how you think; your life is shaped by your thoughts." (Proverbs 4:23 TEV) Don't allow thoughts to run indiscriminately in your mind. Be selective. Choose carefully what you think about. Follow Paul's model: "We capture every thought and make it give up and obey Christ." (2 Corinthians 10:5 NCV) This takes a lifetime of practice, but with the help of the Holy Spirit you can discipline the way you think.
“I beseech you therefore, brethren, by the mercies of God, that you present your bodies a living sacrifice, holy, acceptable to God, which is your reasonable service. And do not be conformed to this world, but be transformed by the renewing of your mind, that you may prove what is that good and acceptable and perfect will of God.”
Romans 12:1-2 NKJV