Psychological factors — Psychological issues such as depression, anxiety, guilt or fear can sometimes cause sexual problems. At one time, these factors were thought to be the major cause of impotence. Doctors now know that physical factors cause impotence in most men with the problem. However, embarrassment or "performance anxiety" can make a physical problem worse.
Ejaculatory incompetence, erectile difficulty, erectile dysfunction, erectile failure, frigidity–female Medtalk The inability to achieve or maintain a penile erection adequate for the successful completion of intercourse, terminating in ejaculation; penile erection is mediated by nitric oxide Epidemiology Prevalence of minimal, moderate, and complete impotence in the Massachusetts Male Aging Study was 52%; age is the most important factor; complete impotence ↑ from 5%–age 40 to 15%–age 70; for an erection to achieve a successful outcome, it requires
Sexual dysfunction is highly prevalent in men and women. In the MMAS, 52% of the respondents reported some degree of erectile difficulty. Complete ED, defined as (1) the total inability to obtain or maintain an erection during sexual stimulation and (2) the absence of nocturnal erections, occurred in 10% of the respondents. Mild and moderate ED occurred in 17% and 25% of responders, respectively. 
These are not currently approved by the FDA for ED management, but they may be offered through research studies (clinical trials). Patients who are interested should discuss the risks and benefits (informed consent) of each, as well as costs before starting any clinical trials. Most therapies not approved by the FDA are not covered by government or private insurance benefits.
The penis is composed of three cylinders, two on the top and one on the underside of the penis. The top two cylinders are involved in the erectile process. The urethra, the tube that urine and semen pass through, is on the underside of the penis. The top two penile cylinders, the corpora cavernosa, are composed of tissue that is analogous to a sponge, containing spaces that can fill with blood and expand. These two cylinders are surrounding by a strong layer of tissue, like Saran wrap, the tunica albuginea. For an erection to occur, there must be properly functioning nerves, arteries, veins, and normal penile tissues.
Years ago, the standard treatment for impotence was an implantable penile prosthesis or long-term psychotherapy. Although physical causes are now more readily diagnosed and treated, individual or marital counseling is still an effective treatment for impotence when emotional factors play a role. Fortunately, other approaches are now available to treat the physical causes of impotence.
Men who do not respond or tolerate oral medications are best treated with an internal penile pump (IPP) commonly known as an inflatable implant. The Internal Penile Pump is an inflatable, water-filled device. During the course of a 45-minute outpatient procedure, the pump is inserted through a one-inch opening in the scrotal sac. By squeezing the pump, (which is contained completely within the scrotum), for approximately a minute, fluid is pumped into the penis, resulting in a long lasting erection. To return the penis to its flaccid state, simply press and hold down the pump. Once inserted, there is no maintenance required for the pump, which can remain in place for a lifetime. Couples are once again able to have spontaneous sex. Normal sensation including orgasm and ejaculation are not affected.
Counselling or sex therapy (58% of people find this works for them) –mind-related causes of erectile dysfunction can affect anyone. They are more likely if you experience erectile dysfunction at a younger age. Talking to a counsellor or therapist can help some people overcome erectile dysfunction related to these problems, possibly for good. They can also help you if your erectile dysfunction is causing you stress, as this can make matters worse.
Erectile dysfunction (ED) affects 50% of men older than 40 years,  exerting substantial effects on quality of life.  This common problem is complex and involves multiple pathways. Penile erections are produced by an integration of physiologic processes involving the central nervous, peripheral nervous, hormonal, and vascular systems. Any abnormality in these systems, whether from medication or disease, has a significant impact on the ability to develop and sustain an erection, ejaculate, and experience orgasm.
In the Massachusetts Male Aging Study (MMAS) among a community-based survey of men aged 40-70 years, 52% of the men reported some degree of erectile difficulty. Complete ED, defined as the total inability to obtain or maintain suitable erections during sexual stimulation, as well as the absence of nocturnal erections (normal erections [four to six/night], which occur during sleep), occurred in 10% of the men in the study. Lesser degrees of mild and moderate ED occurred in 17% and 25% of participants.
Erectile dysfunction is common, increases with age, and is associated with multiple common medical problems. A variety of successful therapies exist for men with erectile dysfunction. The success of the therapies can vary with the cause of the erectile dysfunction. A stepwise approach to the treatment of ED allows one to identify the therapy that is effective and the least invasive for the individual. Oral therapy remains the first line medical therapy for ED, however, is effective overall in 40%-80% of individuals. For those individuals who cannot take PDE5 inhibitors or fail from an efficacy or side effect standpoint, a number of alternatives exist. Intracavernous injection therapy is the most effective therapy for ED, however, the invasive nature can affect compliance. Penile prosthesis is a highly effective surgical procedure, but men undergoing placement of a penile prosthesis should be aware of the benefits and risks associated with placement of a penile prosthesis. Other surgical therapies, such as arterial surgery, are rarely needed.
Certain types of blood pressure medications, antiulcer drugs, antihistamines, tranquilizers (especially before intercourse), antifungals (hetoconazole), antipsychotics, antianxiety drugs, and antidepressants, known as selective serotonin reuptake inhibitors (SSRIs, including Prozac and Paxil), can interfere with erectile function. Smoking, excessive alcohol consumption, and illicit drug use may also contribute. In rare cases, low levels of the male hormone testosterone may contribute to erectile failure. Finally, psychological factors, such as stress, guilt, or anxiety, may also play a role, even when the impotence is primarily due to organic causes.
Surgical intervention for a number of conditions may remove anatomical structures necessary to erection, damage nerves, or impair blood supply. Erectile dysfunction is a common complication of treatments for prostate cancer, including prostatectomy and destruction of the prostate by external beam radiation, although the prostate gland itself is not necessary to achieve an erection. As far as inguinal hernia surgery is concerned, in most cases, and in the absence of postoperative complications, the operative repair can lead to a recovery of the sexual life of people with preoperative sexual dysfunction, while, in most cases, it does not affect people with a preoperative normal sexual life.
Usually there will not be a specific treatment that will lead to the improvement of erectile dysfunction. However, there are treatments that will allow erections to happen and can be used to allow sexual activity to take place. There are three main types of treatments: non-invasive treatments such as tablet medicines and external devices (e.g. vacuum device); penile injections; or for men who have not had success with other treatments, surgery may be an option.
With an inflatable implant, fluid-filled cylinders are placed lengthwise in the penis. Tubing joins these cylinders to a pump placed inside the scrotum (between the testicles). When the pump is engaged, pressure in the cylinders inflate the penis and makes it stiff. Inflatable implants make a normal looking erection and are natural feeling for your partner. Your surgeon may suggest a lubricant for your partner. With the implant, men can control firmness and, sometimes, the size of the erection. Implants allows a couple to be spontaneously intimate. There is generally no change to a man's feeling or orgasm.