I used to have the same problem. Try the following:
1. Massage your balls. It helps your penis to relax.
2. When you do PE you should try to concentrate on smth else rather than on your dick. You can read, browse on the Internet, watch TV or whatever. I personally listen to music (no sexy female voices!))) and read at the same time (military history works best))).
I think that masturbating before PE is not a good option. I’ve tried it, but still got erect and stretching caused pain.
If I masturbate, I try to do it during my rest days and never before or straight after my workout. Better safe than sorry ))