Could be a mental thing. I've had it before when after a particularly bad sex experience (not necessarily punting), it plays on my mind in my next sex sessions. I start to second guess myself if I can truly enjoy myself, whether I can get over the line, etc. Then that seed of doubt becomes a self fulfilling prophecy, it causes the sex to be bad simply because of the doubt.
One way I found that can fix it is a "circuit breaker". Just abstain (including self-help) for an extended period of time. How long this is depends on how frequently you usually have sex. If you normally do it once a week, maybe take a month or 2 off sex. Just to give your head the time to forget the bad experience.