Ever since I was in my young teens, around age 15 (yes I was sexually active then) I have had problems maintaining an erection. I used to watch a lot of pornography starting around age 12. I was easily able to obtain an erection and bring myself to ejaculation, but when it came to the first time I tried to have sexual intercourse, I was unable to maintain an erection that lasted long enough for sexual intercourse and nothing ever ended up happening between us. While dating a girl later in high school I tried sexual intercourse again, only to encounter the same problem. I was able to obtain an erection, but when I tried to put on a condom my erection didn't last long enough to get it on. My erection went away and after that I was not able to recover my erection. One day I decided to attempt sexual penetration right after stimulation rather than trying to put on a condom. The sexual intercourse was successful and after that I didn't face any issues sleeping with this girl after that, however, the same problem arises whenever i am with a new sexual partner or an unfamiliar situation. I have considered the possibility that I may have ED, but I am only 20 years old, and I know that ED is not likely with my age. I have faced problems with depression, stress and anxiety throughout pretty much the entirety of my life. I face issues with self esteem and also smoke cigarettes regularly. I have Borderline Personality Disorder, and what I consider to be a pretty severe case of it. I still don't usually have problems being stimulated, but once I am my erection last only such a short amount of time, and in many cases it is much more difficult to stimulate after the initial arousal. This has at this point become a pretty big problem for me, and lately has been causes me a lot of stress so I'm here for advice about what I should do. Is it possible that I might have a case of ED or is it more likely linked to problems with stress, anxiety and other such factors? Even when i feel moderately comfortable in whichever situation I'm in, maintaining an erection is very difficult. Because of my first couple experiences I tend to focus too much on trying to make sure I stay hard and distract too much of my attention to it while in bed. Could this be a potential cause as well? Should I see a doctor or is there other suggested solutions that I should try?