God has given you the strength to withstand any (and all) temptation.
Your job is to stand firm, wait for your way out, and (then) remove yourself from the situation, environment, negative thoughts…or whatever the temptation is.
Easier said than done. Luckily for us — nothing is too hard for God.
(1 Corinthians 10:13) No temptation has overtaken you that is not common to man. God is faithful, and he will not let you be tempted beyond your ability…he will also provide the way of escape.
The Bible, Simplified