Thank you for your query at DoctorSpring.com
I understand your concern.
What you experienced is very common, and every man at same point of his life goes through the same issue.
It seems like you really like her and got scared before you both were about to have sex.
It's a good thing that you understood that what the problem is yourself. Erection is extremely complex and there are a lot of factors working together so that you get hard erection. Psychological causes are the commonest for an inability to achieve an erection. Also when you're about to have the act, you need to focus only on the act, and take your mind off other things completely ( whether you will get an erection, whether you will stay hard, e.t.c ). A lot of patients have the same issue, where instead of focussing on the act, they tend to be worried about their size, or whether they would be able to maintain erection, and end up having no sex at all. So please take it slow, engage in more foreplay, and when the moment comes again, have sex with her. There are no natural ways to get over this anxiety, apart from you yourself realising the problem and avoiding anxiety altogether.
Hope this was helpful,