Henry Makow wrote an article on celibacy. He recommends Julian Lee's website
Managing the Male Sex Drive
Being human is a spiritual discipline. It means holding our behaviour accountable to our ideals and evolving morally. Let's catch ourselves when we look at women lasciviously. There is a difference between that and admiring their sex appeal, beauty and grace.
Holding ourselves accountable requires will power. We are the product of our thoughts. The thought is father of the deed. We must control our thoughts and the stimuli we allow.
One acquaintance doesn't masturbate very often. "Why stoke the fires?" he says. He keeps his mind off sex and focuses on more exciting pursuits.
This is called sublimation. The prodigious American writer Upton Sinclair (1878-1968) wrote in his Autobiography (1962):
My chastity was preserved at the cost of much emotional effort...What did I get in return for this? I got intensity and power of concentration; these elements in my make-up were the product of my effort to resist the tempter.
I learned to work fourteen hours a day at study and creative effort because it was only by being thus occupied that the craving for woman could be kept out of my soul. I recited the Wisdom of Solomon: "he that ruleth his spirit is greater than he that taketh a city." (p. 46)