Although there can be various causes for erectile dysfunction
but the most important and common cause at such a young age as that of yours is psychological.Your all symptoms are psychological and stem from depression
and guilt which you have developed because of your habit of masturbation
Masturbation is not at all bad but it causes problem when person feels guilty about it.The only bad thing about masturbation is,if it is done daily as a part of habit and routine.If you do madturbation occasionally and only on sexual arousal,it doesn't cause any proble.
Do the following..
Do regular aerobic exercises
for 45 minutes a day.
and deep breathing exercises.
Take good nutritious food like fresh fruits and dry fruits,green vegetables,fish,chicken and eggs.
You shall be all right in next 2 months.