You fight it the way Jesus did: by knowing who you are, knowing what God said, and refusing to give your flesh a vote.
First, know this: being tempted isn't a sin. Jesus "faced all of the same testings we do, yet he did not sin" (Hebrews 4:15 NLT). And it's not unique to you. "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, but with the temptation he will also provide the way of escape" (1 Corinthians 10:13 ESV).
Every temptation you'll ever face fits into one of three categories: I want to feel good, I want to have more, or I want to be admired (1 John 2:16). Satan used all three on Jesus in the wilderness. Turn these stones into bread. Throw yourself off the temple. Bow down and I'll give you the kingdoms of the world (Matthew 4). Jesus passed every test. Here's how.
1. Know who you are
Before Jesus was ever tempted, the Father spoke over Him at His baptism: "This is my beloved Son, with whom I am well pleased" (Matthew 3:17 ESV). So when Satan tempted Him to feel good, have more and be admired, He didn't need to. He was secure in His Father's love. A lot of our temptation is really an attempt to fill a hole only God can fill. You don't need to feel good, have more or be admired when you know you're already loved.
2. Know what God said
Jesus answered every temptation the same way: "It is written." "Man shall not live by bread alone, but by every word that comes from the mouth of God" (Matthew 4:4 ESV). You can't swing a sword you've never picked up. "I have stored up your word in my heart, that I might not sin against you" (Psalm 119:11 ESV).
3. Don't give your feelings the final vote
If all I want is to feel good, I'll choose good feelings over obedience every time, because obedience often feels bad in the moment. Saying no doesn't feel good. Ending a relationship you know isn't right doesn't feel good. When feelings get the final vote, obedience always loses.
4. Cut it off
Jesus said, "If your right eye causes you to sin, tear it out and throw it away" (Matthew 5:29 ESV). He's not asking for surgery. He's saying get violent with whatever keeps tripping you up. Delete the app. Block the number. Change the route home. You don't win the fight with temptation by standing near it and being strong. You win by getting away from it.
You might be thinking, "I've tried. I keep falling." Then don't fight alone. "Confess your sins to one another and pray for one another, that you may be healed" (James 5:16 ESV). Hidden sin gets stronger in the dark. And when you do fall, get back up. "Submit yourselves therefore to God. Resist the devil, and he will flee from you" (James 4:7 ESV).
Scripture: Hebrews 4:15; 1 Corinthians 10:13; 1 John 2:16; Matthew 3:17; 4:1–11; 5:29–30; Psalm 119:11; James 4:7; 5:16