Hello,
Thanks for asking your query at health care magic.
I understand your concern. I am Dr Alok Sinha, MD Psychiatry from India. I will try to help you with best of my effort.
As you accept that you can have sufficient erection while getting
oral sex, this signifies that you do not have any permanent serious problem.
Then the question arises that, why you lose erection at the time of real sex.
Let me first educate you about physiological mechanism of erection. Each sexual activity begins in brain. In a relaxed mind when ever there is desire for sex, it activates certain
nerve cells in brain which in turn send signal to
spinal cord and ultimately reach at penis. Penis has
erectile tissue which acts on getting signal from brain. If brain is not relaxed, is pre-occupied with memories of past stressful experiences, is worried about future, having fear of failure, or under pressure of performance, it triggers sympathetic system of the body. Sympathetic activation goes against erection as due to this the brain fails to send desired signal to spinal cord and finally to sexual organ.
Apparently it is happening in your case. Already you are recovering from a relationship failure. So, your mind has experienced some amount of stress, whether you accept it or not.
Secondly at the time of passive sexual gratification, when someone is working on your genitalia and you are passively enjoying, there is little performance pressure, but when you are at real work you face low confidence due to memories of past failure and you face an intense pressure to perform well in front of your partner along with fear of failure in the back of mind. This causes a lot of
anxiety and again activation of sympathetic system causing failure of erection.
Rightly you accept that it is all in your head. Believe me, if a person like you comes to my clinic, I assess him first for anxiety disorder and then give him psych-education about the illness, few anxiolytic medicines to relax and
psychotherapy to alleviate the fear of failure and boost confidence. It works well. At your age and in this background there is unlikely any other cause of failure of erection.
You just need to get control of your fear and anxiety. I suggest you to
consult a psychiatrist, who may assess you in detail and may bring cure.