I believe there are seven things that will give you victory over temptation:
1. Knowing that Satan cannot make you do anything you don't
want to do. He cannot move your body unless you want to move it.
2. Knowing that God has the power to deliver you from every
temptation, if you are willing. You have to hand your will
over to him 100% and resist the devil and he will flee from you:
"Submit yourselves therefore to God.
Resist the devil, and he will flee from you" (James 4:7).
You could pray something like this: "Our Father in heaven,
Lord Jesus Christ, and Holy Spirit, I lift my will into your
hands 100%, and I leave it there, and I pray not my will, but
your will be done in all matters continually."
"I resist the devil in the name of Jesus Christ of Nazareth.
Depart from me, every spirit of temptation, in the name of
Jesus Christ of Nazareth. Depart from me, every spirit of [the
particular sin that is tempting you] in the name of Jesus
Christ of Nazareth."
"I renounce and reject Satan, and all of his works and all of his
ways. I renounce and reject all unclean spirits, and all of their
works and all of their ways. I renounce and reject every spirit of
[the particular sin that is tempting you] in the name of Jesus
Christ of Nazareth."
"Lord Jesus Christ of Nazareth, I plead that you would deliver me from
every unclean spirit; I plead that you would deliver me from every spirit of
[the particular sin that is tempting you]. I pray in your own name, Amen."
3. Knowing that there is no such thing as more temptation than you
can bear. Pray and ask God to reveal to you the way of escape from the temptation:
"There hath no temptation taken you but such as is common to man:
but God is faithful, who will not suffer you to be tempted above
that ye are able; but will with the temptation also make a way to escape,
that ye may be able to bear it" (1 Corinthians 10:13).
4. Knowing that God never wants you to sin any sin, no matter how small.
Satan will try to sound like Jesus in your thoughts, telling you it's
okay to sin this time, that it's his will, or he will say that he uses
your sinning for his glory, or that you need to sin this sin so that you
can stay humble before other people, or so that you can grow spiritually
as you exercise with the weights of sin, or so that in your moral weakness
(instead of physical weakness) his strength can be made perfect, or so that
like a pot with a crack in it you can water the pathway of your life, or
that sinning this sin will keep you from sinning a greater sin, or he will
say that he has cleansed this particular sin so that it's okay for you to
continue in it as long as you please, or he will speak any number of
other deceptions in your mind, sounding like Jesus himself, all in order
to get you to wilfully commit sin in the sight of God.
But always remember this scripture:
"Let no man say when he is tempted, I am tempted of God:
for God cannot be tempted with evil, neither tempteth he any man:
But every man is tempted, when he is drawn away of his own lust"
(James 1:13-14).
5. Knowing that there is no such thing as necessity as far as any sin
is concerned. We have been commanded not to make any provision
whatsoever for sin:
"Abstain from fleshly lusts, which war against the soul" (1 Peter 2:11).
"Make not provision for the flesh, to fulfil the lusts thereof" (Romans 13:14).
"Walk in the Spirit, and ye shall not fulfil the lust of the flesh"
(Galatians 5:16).
"For this is the will of God, even your sanctification, that ye should
abstain from fornication: that every one of you should know how to possess
his vessel in sanctification and honour; not in the lust of concupiscence,
even as the Gentiles which know not God" (1 Thessalonians 4:3-5).
6. Knowing that temptation that continues can be thought of as a pain in
the body: it can be ignored. If you can bear a pain in your body without
having to commit a sin in the sight of God, then you can bear a temptation
in the body without having to commit a sin.
"Ye have not yet resisted unto blood, striving against sin" (Hebrews 12:4).
7. Knowing that those who claim to know Jesus but continue to willfully
practice sin will be rejected:
"Many will say to me in that day, Lord, Lord, have we not prophesied
in thy name? and in thy name have cast out devils? and in thy name done
many wonderful works? And then will I profess unto them, I never knew you:
depart from me, ye that work iniquity" (Matthew 7:22-23).
"Whosoever committeth sin is the servant of sin" (John 8:34).
"They themselves are the servants of corruption: for of whom a man is
overcome, of the same is he brought in bondage" (2 Peter 2:19).
"He that committeth sin is of the devil" (1 John 3:8).
"Ye are of your father the devil, and the lusts of your father
ye will do" (John 8:44).
"By mercy and truth iniquity is purged: and by the fear of the LORD
men depart from evil" (Proverbs 16:6).
"Now they have no cloak for their sin" (John 15:22).