There are hundreds of medications that have the side effect of ED and/or decreased libido. Examples of drugs implicated as a cause of ED include hydrochlorothiazides and beta-blocking agents. Medications used to treat depression, particularly the SSRIs such as citalopram (Celexa), escitalopram (Lexapro), fluoxetine (Prozac, Prozac Weekly, Sarafem), fluvoxamine (Luvox, Luvox CR), paroxetine (Paxil, Paxil CR, Pexeva) and sertraline (Zoloft), may also contribute to ED.9 Bupropion (Wellbutrin) which has a predominant effect on blocking the reuptake of dopamine is an antidepressant with lower incidence of ED.10 The side effects of 5ARIs occurring in fewer than 5% of patients can include gynaecomastia, ED, loss of libido and ejaculatory dysfunction.11
Cosgrove et al reported a higher rate of sexual dysfunction in veterans with posttraumatic stress disorder (PTSD) than in veterans who did not develop this problem.  The domains on the International Index of Erectile Function (IIEF) questionnaire that demonstrated the most change included overall sexual satisfaction and erectile function. [43, 44] Men with PTSD should be evaluated and treated if they have sexual dysfunction.
In some cases, nocturnal penile tumescence testing is performed to find out whether the man has erections while asleep. Healthy men usually have about four or five erections throughout the night. The man applies a device to the penis called a Rigiscan before going to bed at night, and the device can determine whether he has had erections. (If a man is able to have normal erections at night, this suggests a psychological cause for his impotence.)
As is true in so many medical conditions, lifestyle modifications, considered first-line therapy, can have a salutary effect in ED management, and men should be encouraged to make the necessary changes to the benefit of their sexual function and to their overall health as well. Despite the benefits of behaviour modification, men presenting with ED want the physician to help with measures that can have an immediate impact.
In order to establish whether normal erections are occurring overnight (nocturnal erections), the doctor may organise nocturnal penile tumescence (NPT) testing. This involves wearing a monitor overnight in your own home. The data from this monitor is then assessed to analyse how often erections occurred, how long they lasted, and how rigid and large the penis was during the erections. If NPT testing is normal, the cause of erectile dysfunction is usually psychological. If not, further testing of the blood flow in the genital area may be required to see if there is blockage or leakage. The doctor may also organise a blood test of levels of hormones such as testosterone, prolactin and thyroid stimulating hormone to see if these are contributing to the erectile dysfunction.
As recently as two decades ago, doctors tended to blame erectile dysfunction on psychological problems or, with older men, on the normal aging process. Today, the pendulum of medical opinion has swung away from both notions. While arousal takes longer as a man ages, chronic erectile dysfunction warrants medical attention. Moreover, the difficulty is often not psychological in origin. Today, urologists believe that physical factors underlie the majority of cases of persistent erectile dysfunction in men over age 50.
Erectile dysfunction (ED) is commonly called impotence. It’s a condition in which a man can’t achieve or maintain an erection during sexual performance. Symptoms may also include reduced sexual desire or libido. Your doctor is likely to diagnose you with ED if the condition lasts for more than a few weeks or months. ED affects as many as 30 million men in the United States.
Treatment depends on the underlying cause. In general, exercise, particularly of the aerobic type, is effective for preventing ED during midlife. Exercise as a treatment is under investigation.:6, 18–19 For tobacco smokers, cessation often results in a significant improvement. Oral pharmacotherapy and vacuum erection devices are first-line treatments,:20, 24 followed by injections of drugs into the penis, as well as penile implants.:25–26 Vascular reconstructive surgeries are beneficial in certain groups.
If you have a neurological disorder or spinal cord injury and other erectile dysfunction treatments aren’t effective, two types of surgical implants could offer solutions to your ED. “An implantable pump can be used to manually create an erection by pumping fluid into cylinders placed inside the penis,” explains Feloney. “The other option is a malleable prosthesis that works like a gooseneck lamp to direct the penis into position for intercourse." Risks for these ED treatments include infection and mechanical breakdown.
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.
Commercials for drugs to improve “low T,” or testosterone, the male hormone, are now vying for airtime, but they address desire, not performance. "Male hormone is not an approved treatment for erectile dysfunction," notes Bennett. "It may be used to increase desire in men who have low testosterone, but it doesn’t improve blood flow to an erection." A doctor can do a blood test to check you for low testosterone, but it is a rare cause of ED. Hormone therapy with injections, patches, or gels applied to the skin may improve mood and sex drive, but it likely won’t fix any mechanical issues. Also, testosterone drugs should not be used by men with prostate cancer. Side effects include acne, breast enlargement, prostate enlargement, and fluid retention.
The dorsal artery provides for engorgement of the glans during erection, whereas the bulbourethral artery supplies the bulb and the corpus spongiosum. The cavernous artery effects tumescence of the corpus cavernosum and thus is principally responsible for erection. The cavernous artery gives off many helicine arteries, which supply the trabecular erectile tissue and the sinusoids. These helicine arteries are contracted and tortuous in the flaccid state and become dilated and straight during erection. 
Psychosexual counselling, or sex therapy, is an appropriate recommendation especially for men who are experiencing discord with their partner especially if the conflict is related to the man’s ED. Counselling usually consists of 5–20 sessions with counsellor. It is our recommendation that referral doctors treating men with ED make a referral to a psychotherapist or sex therapist who is certified by AASECT (American Association of Sexuality Educators, Counselors and Therapists) of certified sexuality educator.43
Alteration of NO levels is the focus of several approaches to the treatment of ED. Inhibitors of phosphodiesterase, which primarily hydrolyze cGMP type 5, provided the basis for the development of the PDE5 inhibitors. Chen et al administered oral L-arginine and reported subjective improvement in 50 men with ED.  These supplements are readily available commercially. Reported adverse effects include nausea, diarrhea, headache, flushing, numbness, and hypotension.
Diabetes is a well-recognized risk factor for ED. A systematic review and meta-analysis found that the prevalence of ED was 37.5% in type 1 diabetes, 66.3% in type 2 diabetes, and 52.5% in diabetes overall—a rate approximately 3.5 times higher than that in controls.  The etiology of ED in diabetic men probably involves both vascular and neurogenic mechanisms. Evidence indicates that establishing good glycemic control can minimize this risk.
Alprostadil is injected into the side of penis with a very fine needle. It's of great value to have the first shot in the doctor's office before doing this on your own. Self-injection lessons should be given in your doctor's office by an experienced professional. The success rate for getting an erection firm enough to have sex is as high as 85% with this treatment. Many men who do not respond to oral PDE5 inhibitors can be ‘rescued' with ICI.