The middah of humility is one of the most powerful tools in dealing with sexual desire and obsession. When you are feeling weak, vulnerable and needy, and everything inside you in craving to just give in, one of the best ways to overcome the test is to just let go and say to yourself " Who am I? What are my desires against the desires of the creator of all the universe?!". Even though every fiber of your being is pulling you in one direction, you can annul yourself before G-d and give up your entire being to him. There is no greater sacrifice than this. Happy is the man who is zoche to be able to do this. It is considered by Hashem as if he offered himself up on the Mizbeach as a sacrifice.