There's no heter to act out before the fact. Once it happens, though, we need to deal with it intelligently, such as by setting up safeguards to avoid the same Michshol in the future. What safeguards do you currently have in place?
If you're careful when it comes to guarding your eyes, the y"h to act out will be much much less.
At the very least, I suggest making a list of things you have to do before acting out, with a penalty for not doing them (this is along the lines of the Taphsic method - see
www.guardyoureyes.org/?p=2451). Examples: calling someone up, taking a shower, reciting tehilim, learning Torah. Finally, be determined that, regardless,
you will not act out with visual stimulation. That simply feeds the addiction too much, and makes it that much harder to stop in the future (if your rationalization to act out is that you're not married, that still would not justify using visual stimulation).
Finally, please don't feel that the Halacha is torturing you. The very struggle is precious in the eyes of Hashem, and the reward for every minute is incalculable. Also, other suffering that would have come your way later in life will be nullified if you accept this suffering upon yourself. Keep in mind, though, that it will get easier and easier over time as you continue to avoid visual stimulation.