David Powlison wrote a two-part article (Part 1 – Part 2) on fighting sexual sin, but his words are true for any spiritual battle:
Imagine that your heart, your true inner self, is a room filled with your thoughts, feelings, experiences, and perceptions. Some are good and full of light, and some are bad and full of evil and darkness. There are two ways to clean out the evil and darkness and bring light and goodness to the whole room. You can eject the evil bodily: Fight the sin! Say no! Call your accountability person. Repent. Remember the Bible. Cry out to God for mercy. That’s one-half of the battle.
The other way you fight sin is to flood your heart with light. When the room of your heart is filled with light, the shadows, the darkness, and the evil will be pushed out. You don’t just put off your sins; you have to put on something new. Part of winning your battle with sexual sin is learning a new way of living. (via)
Paul says it this way in Colossians 3:
Put to death therefore what is earthly in you: sexual immorality, impurity, passion, evil desire, and covetousness, which is idolatry. On account of these the wrath of God is coming. In these you too once walked, when you were living in them. But now you must put them all away: anger, wrath, malice, slander, and obscene talk from your mouth. … Put on then, as God’s chosen ones, holy and beloved, compassionate hearts, kindness, humility, meekness, and patience (Colossians 3:5-12)