I'm sure what you're asking about. If you're referring to not lasting as long as you'd like and erections that come and go, here's some information for you. Note that this forum deals only with psychological and emotional aspects of erection concerns.
Welcome to your 30’s! When you're younger and just beginning to be sexual with others, erections pop up everywhere--including when you don't want them! Post-pubescent men are highly excitable. After all, sex with a partner is new, and anything new is terribly exciting.
As you age, you'll find that erections sometimes take longer, and even come and go. This is not an indication if ill health, but just part of life.
You've been told that there’s no medical or physiological condition interfering—it’s all in your head. Something about being sexual with a partner is causing you anxiety. What do you suppose it is? Is it possible that you’re worrying yourself into this problem? In other words, once you began to worry, you stopped being able to enjoy yourself, so naturally, your erections disappeared, and you created a self-fulfilling prophesy. Often, anxiety and nervousness create a situation in which you can't relax enough to feel pleasure.
Worrying about erections is a dead-end street. All it will do is make you anxious, which will make your penis very uncooperative. And remember you don't need an erection to be sexual, have fun, experience pleasure, etc. Relax, enjoy your own unique sexuality and stop judging yourself.
And stop worrying about so-called “erectile dysfunction.” There’s no such thing. People use this term to mean anything from “couldn’t get an erection on command after having a fight with my wife” to “have never had an erection in my life.” Viagra doesn’t alleviate anxiety, etc. All it does is open up blood flow to the penis. It’s for men who have a medical condition such as diabetes, which prevents blood flow. It's obvious from your comments that there's something emotional going on, for which Viagra isn't the answer. I wonder if you've examined your feelings about your relationship with your partner and whether you have any unexpressed anger/resentment about its "on and off" nature.
Anxiety, anger, resentment and discomfort don't just affect erections. Sometimes, they contribute to a feeling of just wanting to get it over when it comes to sex. The two are definitely related. Here's some information about male orgasm patterns:
During their early self-pleasuring experiments, many men learn a very quick orgasm pattern in order to avoid detection—like in the bathroom (“You’ve been in there for hours! What are you doing?”) So if you learned to come quickly when being sexual with yourself, that can also set up a lifelong pattern. Learning to come quickly with a partner can also set up this pattern. Guilt and anxiety about sex may also create a situation where some men just want to get it over with quickly so they won’t have to deal with any of those feelings. And, of course, if you’re focused on “performing,” rather than just enjoying yourself, your penis can become incredibly stubborn and uncooperative.
Once you learn to control your orgasm, realize that each man has an individual orgasmic pattern unique to him. A lot of this anxiety about “premature” ejaculation is based on paranoia, and the idea that it's somehow ideal to have erections last way longer than they tend to realistically for most men, most of the time. Sure, sometimes, a man might last 15 minutes, 30 minutes, even an hour, but 75% of all males have an orgasm within 2 minutes of beginning penis-vagina (p-v) sex. I wonder if you’ve asked your partner how long she would like you to last? Are you thinking that if you last longer, somehow she’ll have an orgasm during p-v sex? The fact is that most women DON’T orgasm during p-v sex. It’s a much more effective way for men to orgasm than women, so please don’t attempt to reach some kind of “orgasmic goal” because you think it will ultimately please her.
That said, here are some techniques for lasting longer:
First, slow down during self-pleasuring and unlearn that old pattern of quick orgasm. You state that as soon as you touch yourself, you orgasm. You need to tune into what's going on in your head. What are you thinking about just before you touch yourself? Are you relaxed and turned on, or are you feeling anxious, guilty, conflicted? This can set up a pattern of quick orgasm.
Try just thinking something sexual and letting your penis get erect, and then think about something non-sexual and let your penis relax. Do this many, many times in order to get the sense of control.
Then try teasing yourself by touching yourself just once, then backing off and relaxing, and then beginning again. This will give you a sense of control as well as teach you to recognize your own point of no return (when you know you're about to have an orgasm, no matter what). Another thing to try is when you feel yourself getting close to orgasm, relax, breathe deeply, and cease movement. Some men also find they last longer if they have an orgasm on their own awhile before beginning partner sex. This tends to take the edge off, if you will.
Once you feel in control of your orgasm, you can also examine whether you have any feelings of discomfort with being sexual—either with yourself or with a partner. These feelings of discomfort can create extreme conflict and cause you to feel the need to get it over with quickly. If you look at sex as something to finish quickly—get it up, get it in, get it off—you’ll need to let go of that old mentality. And naturally, if there are any relationship conflicts or you’re angry or feeling resentful about your partner, these can also contribute to wanting to get it over with. In addition, these feelings can also inhibit erections with a partner. I highly recommend the book, "The New Male Sexuality," by Bernie Zilbergeld, Ph.D., widely available on line, both used and in paperback. This book has helped thousands of men to better understand their sexuality. Best of luck to you. Dr. J