Hi, this is just anxiety I'm sure. nothing to worry about as the human mind is a chaotic place sometimes and it is widely known that the "sexual center", the place that allows everything to happen, is the brain.
first, heres some questions.
1: do you get morning erections?
2: before or during sexual "relations" do you think about this problem, or "wonder" if your going to achieve an erection?
3. have you tried just focusing on her and "foreplay" (such as cunnilingus) and not yourself?
lets review your answers, shall we?
1. If you achieve morning erections this means there is generally no testosterone deficiency and your "physical" equipment is alright (generally). This would mean its most obviously psychological.
2.If you focus on things other then sex, expecially anxiety producing things you will not achieve an erection. Stress and anxiety are 80-90% if not more the cause of "young" male erectile dysfunction.
3.If you "go down" on her and just focus on her body, her taste, her noises and "feel" the moment, I'm positive you will achieve an erection. By forgetting a problem YOU DON'T HAVE you can experience the connection between two people sexually and give her massive amounts of pleasure, this in turn will naturally arouse you and give you an erection.
The problem with anxiety and "failure" is it grows upon itself, the same goes for success and confidence. people take "personally" there achievements or lack there of. By taking away this "internal" focus (the problem) you can achieve a natural (auto-pilot) stimulation and arousal.
I to have experienced all this, its hard and it hurts. I have been there and I will gladly respond back to any messages you send me. But you know what, it was all mental. I was with a girlfriend and experienced an "ED" moment. I was stressed about work and my health, I'm a hypochondriac for sure! this anxiety caused me to loose erection when changing positions.
Lucky for me I was with a very determined women and she used her mouth to "get me up". After about three minutes of nothing I said "its not working, im so messed up". Her response saved my sex life, she said "don't think about anything but my mouth on your #$%@". Between thinking about that and the girl from the cellphone store, I was harder then a rock and finished in two minutes.
What am I saying by telling this story, as im surly not bragging, LOL. What I am saying is often HONESTY about whats going on in your head will not only "flatter" her but releve the negative tension that is causing "the problem". People need to talk about what is troubling them to start a constructive "fixing" process, who better to talk to and tell how you feel then her, the (somewhat) cause.
I feel for you and I hope this helps.