I was originally going to write this as a new thread, but I figured it'd be better to shove it in here because you brought up most of the points I was going to make
if you reach the point where your dick is screaming for release and you find it nearly impossible to concentrate on anything else, the act of masturbating itself isn't the failure
the failure is getting to that state in the first place
you have to conceptually separate the urge from the instinct
the urge is the thing that gets you hot under the collar in the first place
if your dick has been throwing a fit all day and it just won't settle down, you've already hit the fail condition
YMMV, but in my case I've found that it's usually much better to just get it out of the way when that happens
IMO confusing these two ideas is one of the biggest mistakes people make, and why people find it so hard to get away from jacking off all the time
what you should be trying to do is not try to control or suppress the instinct itself (which is virtually impossible, it's on the same level as trying to control your heartbeat - similarly, ignoring a heart attack doesn't make it go away), but the urge that triggers it, which is a mental structure that you can control completely with some practice
the key in this case is simply to avoid anything sexual that could trigger your more base nature
I'm not saying you should live in a monastery, but it's important to identify things that will get that particular ball rolling and do your best to avoid them, because once it's on its way down the hill it's only a matter of time before it reaches the bottom
the long-term strategy isn't to catch the ball every time it tips, it's to avoid bumping it long enough so that you can build a platform around it
the wider the platform, the harder it is to knock the ball off, and once it's there it'll only shrink if you wear it down constantly
tl;dr, don't abstain from masturbation itself, identify and abstain from the things that lead you to it