Hello dear,
First of all remove all myths & misconceptions from your mind about 
masturbation. 
In fact, Masturbation is completely normal & doesn't have any bad effect to the body and mind.
Regarding the problem of 
Erectile dysfunction, it is due to decreased blood supply to the penis.
Though medications like Cialis & Viagra increase blood flow to penis & maintains erection, it can be improved by having a diet rich in fruits, vegetables, fish, nuts & honey.
Connections between erectile dysfunction & excess use of porn has been reported in many studies.
For those affected, recovery takes place by 6-12 weeks & mainly involves avoiding the causative factor, that is watching porn.
Regarding the problem of 
premature ejaculation, it's mostly related to 
anxiety. 
So...don't worry about all this & stay relaxed.
Avoid stress...practice 
meditation..this helps in improving concentration & builds up the confidence level.
Avoid smoking & alcohol.
Despite these measures, if you experience difficulty, it will be better to rule out other causes like 
high blood pressure, blood sugar and other local causes that impair blood flow to the genital organ.
One more thing...avoid consuming any 
over the counter medication which claim to increase the size of penis or improve performance...it may be harmful.
Wishing you a Healthy Life.
Take care.