Overcoming lust is a decision. You make the choice not to lust by applying various techniques including:
Philippians 4:4-8
4 Rejoice in the Lord always; again I will say, rejoice! 5 Let your forbearing spirit be known to all men. The Lord is near. 6 Be anxious for nothing, but in everything by prayer and supplication with thanksgiving let your requests be made known to God. 7 And the peace of God, which surpasses all comprehension, shall guard your hearts and your minds in Christ Jesus.
8 Finally, brethren, whatever is true, whatever is honorable, whatever is right, whatever is pure, whatever is lovely, whatever is of good repute, if there is any excellence and if anything worthy of praise, let your mind dwell on these things. NAS