Find an activity to do in your free time, and start exercising if you are not to relieve stress. Also, when you are starting to fantasize or whatever, do deep breathing wig five seconds on, five second hold, and five second exhale. Also, if you have the urge to PMO or MO think about that in the sense of "I have a boner because I want to masturbat, NOT because I want sex" and just think about how demented that is