Thanks for your query.You are a young man of 23 with good health and have been indulged in habit of masturbation
frequently since years.and now facing problem of erectile dysfunction
.In absence of any organic cause most of the erectile problems are mind related.So do not worry following measures will help you to boost up your confidence and solve your problem.
1) Take moderate exercise for 45 minutes everyday morning and meditation
for 1/2 hr.
2) Take high protein fat free diet rich in fruits and vegetables.
3) Avoid alcohol and smoking
.4) Take anti Oxidants like Almonds 5-6 everyday.
If you are not married and are not going for real sex with female do not take any medication like Viagra
to get erection That is not advisable.Do not worry things will be resolved once you start getting indulged in sexual act with your girl friend or wife.