Hello, welcome to health care magic. I am Dr Alok Sinha, MD Psychiatry from India. I will try my best to answer your query.
I have carefully read your question and I understand your concern.
The main reason of
erectile dysfunction at your age is
anxiety and it has come because you consider your habit of
masturbation responsible for it.
There is underlying myth in many person's mind that masturbation causes sexual weakness and it should be condemned. Since you have gone against your belief and prohibitions and kept on masturbating since 18 years of age, now at the time of marriage you suddenly developed doubt about your performance as a result of prolonged masturbation. This might has generated anxiety in you causing activation of sympathetic system of body. This sympathetic activation works against erection (as for erection low sympathetic drive and more of parasympathetic tone is required). You have held yourself responsible for it. This has further generated negative emotions of guilt (of masturbating and ruining your own life).
A past episode of erectile failure in front of your partner has further worsened your anxiety and guilt and as a result now every time you go for it, you relive the past experience and have poor/no erection.
If a person like you comes to me, I tell him to de-
stress by doing some relaxing exercise/
yoga, going for regular walk and exercise, having a sound sleep, avoiding alcohol, caffeine and
nicotine and by hearing some soothing music at evening for relaxation. I also evaluate them in detail for anxiety and depressive symptoms and if needed prescribe anxiolytic medicines for a period of time.
I suggest you to visit a
psychiatrist nearby and get his professional help. Believe me you are going ton be fine soon and can lead a happy married life. I wish you all the best.