The Scriptures teach us that when we encounter temptation, that God will provide a way of escape (2 Cor. 10:13). We also learn from the Bible that Jesus was tempted in every way that we are tempted, yet, without sinning (Hebrews 4:15). Jesus is a great example of how to overcome temptation. Let me point to you one example of how Jesus escaped a very alluring temptation in His life.
In John 5, Jesus was doing a lot of strong teaching and getting in the face of the religious leaders of His day. Many of the common people were loving it! In John 6 Jesus fed over 5,000 people with just five loaves of bread and two fish, hardly enough for the Jesus and his disciples. Jesus does a miracle and creates from two dead fish, more and more fish that never swam but tasted oh so good. He also created more than enough loaves of bread from five to fill up 12 baskets full when everyone was stuffed. Because of this and other miracles that Jesus had done, the crowd was getting excited. They were looking to Jesus and they were thinking that He would make a fantastic leader who will care for them better than anyone ever had in all of history. Listen to what John 6:15 says, "So Jesus, perceiving that they were intending to come and take Him by force to make Him king, withdrew again to the mountain by Himself alone."
I believe that Jesus was tempted to desire to become king of the apple of His eye, but instead, He escaped. He escaped by withdrawing from the temptation to spend time with the Father asking for help, comfort and confirmation of the right path to follow instead of the one that might give the greatest short term feel.
There are other ways of escape and they should be explored and implemented in your life. However, this is a powerful one verse example that Jesus gave us on how to escape strong temptation by withdrawing from the situation (immediately) and turning to God in prayer for strength, relationship and comfort.
I pray that you continue to walk in holiness for the glory and honor of Jesus Christ.