The role of God’s Word is to feed faith’s appetite for God. And in doing this it weans my heart away from the deceptive taste of lust. At first lust begins to trick me into feeling that I would really miss out on some great satisfaction if I followed the path of purity. But then I take up the sword of the Spirit and begin to fight. I read that it is better to gouge out my eye than to lust (Matt 5:29). I read that if I think about things that are pure and lovely and excellent the peace of God will be with me (Phil 4:8). I read that setting the mind on the flesh brings death, but setting the mind on the Spirit brings life and peace (Rom 8:6).
And as I pray for my faith to be satisfied with God’s life and peace, the sword of the Spirit carves the sugar coating off the poison of lust. I see it for what it is. And by the grace of God, its alluring power is broken.
The challenge before us then is not merely to do what God says because He is God, but to desire what God says because he is good. The challenge is not merely to pursue righteousness, but to prefer righteousness. The challenge is to get up in the morning and prayerfully meditate on the Scriptures until we experience joy and peace in believing “the precious and very great promises” of God (Rom 15:13; 2 Peter 1:4). With this joy set before us the commandments of God will not be burdensome (1 John 5:3) and the compensation of sin will appear too brief and too shallow to lure us.
--John Piper (source)