One suggestion is to make sure you're cumming frequently enough so you don't build up too much desire.
It takes time but training yourself using the stop/start technique can work. Start off masturbating solo and dedicate two or three sessions per week to the exercise. Stroke until you start feeling the build up and stop before reaching the point of no return. Start again oce you've regained control. Do this at least four times before letting yourself cum. With time, start going longer and eventually bring your wife in to help. And between practice sessions be sure to have sex with your wife so you aren't missing her pussy.
It might take a month or two but it can work.