"Whenever trouble comes your way, let it be an opportunity for joy. For when your faith is tested, your endurance has a chance to grow. So let it grow, for when your endurance is developed, you will be strong in character and ready for anything." -James 1:2-4
When you are tempted, it is a chance to grow your endurance. See it as such, an opporunity to grow. When the devil tempts you, he makes it seem that holiness is something impossible to attain, an almost acrobatic feat that requires perfect balance and little room for failure.When you see holiness as such, it is very easy to fall into temptation. "There's no chance for me to be holy...might as well give in to this..." is the thought the devil echos in your mind. But when God fills you with the Spirit and lifts you up, He places you on a high plateu, on which you can easily move about. Whenever you are tempted, search for God's presence.
"Since He Himself has gone through temptation, He is able to help us when we are tempted." -Hebrews 2:18
No problem is too hard, no temptation is too severe, God is always there to help you, it's your own mind that makes you fall.