This isn’t all that surprising. When you feel blue and low on energy, it can be extremely difficult to perform at your sexual peak. Furthermore, depression is linked to changes in your brain chemistry and nervous system. Some of these areas also affect your sex drive and ability to have an erection. This means that depression can change the way your brain works, making ED more likely.
You can also consider using a cock ring or penis ring if you are able to get an erection but have trouble maintaining it. Cock rings work by trapping the blood inside your penis so it remains harder for longer. You can purchase one in a sex store or online for about $5 and you put in on over your penis and testicles when you are half hard and keep it on until you are finished with sex. It’s a great cheap fix for erectile issues.
Farag YM, Guallar E, Zhao D, Kalyani RR, Blaha MJ, Feldman DI, Martin SS, Lutsey PL, Billups KL, Michos ED. Vitamin D deficiency is independently associated with greater prevalence of erectile dysfunction: The National Health and Nutrition Examination Survey (NHANES) 2001-2004. Atherosclerosis. 2016 Sep;252:61-7. doi: 10.1016/j.atherosclerosis.2016.07.921. Epub 2016 Jul 29.
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.
Once a complete sexual and medical history has been completed, appropriate laboratory studies should be conducted. In the initial evaluation of ED, sophisticated laboratory testing is rarely necessary. For example, serum testosterone (and sometimes prolactin) is typically only useful when the patient demonstrates hypogonadal features or testicular atrophy, or when clinical history is suggestive. Additional hormonal evaluation may include thyroid stimulating hormone in those with a clinical suspicion of hypothyroidism or appropriate diabetes screening in those presenting with a concern for impaired glucose metabolism. If the patient has not been evaluated with a lipid panel and hyperlipidemia is suspected, measurement and appropriate referral to internal medicine or cardiology is recommended. In most cases, a tentative diagnosis can be established with a complete sexual and medical history, physical examination, and limited or no laboratory testing.
The next new treatments for erectile dysfunction will probably be improvements in some ED drugs already being used. "A dissolvable form of Levitra that you put under your tongue is coming that may work more quickly than the pills we have now," says Feloney. A new form of alprostadil may make it possible for you to rub it directly on the penis instead of inserting or injecting it. And newer phosphodiesterase inhibitors that last even longer and cause fewer side effects are being developed. Stay tuned!
Iatrogenic hypotension can occur in men in neurodegenerative disease using sildenafil (49). Hussain et al. placed men with PD and MSA on sildenafil and recorded blood pressure before and after. Half of the 12 MSA patients developed postural hypotension, while none of the twelve PD patients did. Since MSA can be difficult to distinguished diagnostically from PD, baseline blood pressure measurements prior to prescribing the medication and seeking medical assistance if symptomatic hypotension occurred was recommended for all patients with PD, and MSA. Of note, none of the men with MSA who developed hypotension discontinued sildenafil use due to its effectiveness at improving their erections.
Impotence is the inability to get and keep an erection hard enough to have sex. Many men experience difficulties getting an erection when they are tired or stressed. This is normal and it doesn’t require treatment. However, if you encounter problems that persist, you may be suffering with a degree of impotence. Impotence is a very treatable condition and help is available either when you visit your local GP or an online doctor.
Do erectile dysfunction exercises help? Many people have erectile dysfunction (ED), but it is often possible to reverse this with exercises to strengthen muscles in the area. These include pelvic floor exercises. ED can often be due to lifestyle factors including obesity and low physical activity levels. Learn more about exercises for ED here. Read now
Radical prostatectomy for the treatment of prostate cancer poses a significant risk of ED. A number of factors are associated with the chance of preserving erectile function. If both nerves that course on the lateral edges of the prostate can be saved, the chance of maintaining erectile function is reasonable. The odds depend on the age of the patient. Men younger than 60 years have a 75-80% chance of preserving potency, but men older than 70 years have only a 10-15% chance.
Having learned a great deal more about erectile dysfunction including its risk factors and causes, you should be equipped to assess your own erectile function. If you have experienced erectile issues or you have some of the risk factors mentioned above, it may be worth making a trip to your doctor’s office. If you choose to seek help, give your doctor as much information as you can about your symptoms including their frequency and severity as well as the onset. With your doctor’s help, you can determine the best course of treatment to restore sexual function.
The most common treatment for erectile dysfunction is drugs known as phosphodiesterase-5 (PDE-5) inhibitors. These include tadalafil (Cialis), vardenafil (Levitra), and sildenafil citrate (Viagra). These are effective for about 75% of men with erectile dysfunction. They are tablets that are taken around an hour before sex, and last between 4 and 36 hours. Sexual stimulation is required before an erection will occur. The PDE-5 inhibitors cause dilation of blood vessels in the penis to allow erection to occur, and help it to stay rigid. Men using nitrate medication (e.g. GTN spray or sublingual tablets for angina) should not use PDE-5 inhibitors.
Taking one of these tablets will not automatically produce an erection. Sexual stimulation is needed first to cause the release of nitric oxide from your penile nerves. These medications amplify that signal, allowing some men to function normally. Oral erectile dysfunction medications are not aphrodisiacs, will not cause excitement and are not needed in men who get normal erections.
The primary nerve fibers to the penis are from the dorsal nerve of the penis, a branch of the pudendal nerve. The cavernosal nerves are a part of the autonomic nervous system and incorporate both sympathetic and parasympathetic fibers. They travel posterolaterally along the prostate and enter the corpora cavernosa and corpus spongiosum to regulate blood flow during erection and detumescence. The dorsal somatic nerves are also branches of the pudendal nerves. They are primarily responsible for penile sensation. 
Watts and coworkers, in their review article, make several points about this ED/CAD nexus. Endothelial dysfunction is present in both CVD and ED, and is linked through the NO mechanism. The authors note that PDE5 inhibitors improve endothelial function and have a salutary effect on both CVD and ED. Both ED and cardiac disease respond to modifications in lifestyle as well as pharmacologic manipulation. These authors also report that the presence of ED gives the clinician an opportunity to assess CVD and prevention as well.20
What happens is that the blood vessels of the penis are rather small, and a small amount of plaque in the penile arteries is going to result in erectile dysfunction. You need more plaque before the person’s actually symptomatic from a heart problem, but they’re linked. And so when anybody, any man has an erectile issue, it’s incumbent upon the physician to make certain that their cardiac status is healthy.
Also called vacuum devices, penile pumps are devices that are placed over the penis to draw blood into the shaft. Once the vacuum creates an erection, the retaining band is slid down to the lower end of the penis and the pump is removed. An erection typically will last long enough for intercourse but your penis may be cold to the touch and the rubber band may restrict ejaculation.22
Implantation of penile prosthesis remains an important option for men with ED if medical treatment fails or is inappropriate. Prostheses are available as a saline-filled silicone device or a malleable device. The benefit of the former is a more natural appearance in the deflated state, closely approximating the appearance of a flaccid penis. The trade-off is a higher mechanical failure rate and higher cost. Satisfaction rates for patients who underwent penile prosthesis surgery have been reported to be near 90%.36 However, in the majority of patients who receive this treatment, less invasive alternatives have failed and therefore satisfaction with this treatment would be expected to be higher in this subset of patients. Risks of these devices include surgical and anesthetic risk, device infection, and device malfunction. Mechanical failure rates depend on the specific device being investigated. Overall, the percentage of devices that are free from mechanical failure at 5 years ranges from 84% to 94%.19 Infection rates in the era of coated devices and improved techniques are reported to be less than 1%.37
The mechanisms by which testosterone plays a role in erectile function are not completely understood. A study evaluating the effect of testosterone on erections in surgically castrated rabbits and control animals, in which the rabbits’ intracavernosal pressures were compared after cavernosal nerve stimulation, determined that castrated rabbits had much lower pressures after stimulation than control rabbits did.  Notably, the pressures increased when castrated rabbits received exogenous testosterone replacement.
Erectile dysfunction in younger men, unless they're diabetic or have suffered some unusually cruel injury, is generally caused by stress, rather than any physical condition. High levels of cortisol or adrenaline (both byproducts of stress) in the body stymie the supply of oxygen to the organs, thereby decreasing blood flow to the penis. And the penis without blood has as much chance of getting up as a balloon without air. Which is why I found it easier to have sex with people I wasn't emotionally invested in: Once the fear of rejection is removed, sex is no big deal.
There are also alternative treatments, such as using a penis pump or a penile injection. Penis pumps work by creating a vacuum and thereby causing more blood to flow to your penis. Penile injections need to be used shortly before intercourse. They contain a medication which widens your blood vessels. A doctor’s prescription is needed for the injections.
Many reasonable nonsurgical erectile dysfunction (impotence) treatment options exist, including external vacuum devices, medications (oral and topical), hormonal therapy, penile injection therapy, and intraurethral pellet therapy. Sex counseling to further improve one's sexual health and sex life is another option and is discussed in Living With Erectile Dysfunction.
A physical exam checks your total health. Examination focusing on your genitals (penis and testicles) is often done to check for ED. Based on your age and risk factors, the exam may also focus on your heart and blood system: heart, peripheral pulses and blood pressure. Based on your age and family history your doctor may do a rectal exam to check the prostate. These tests are not painful. Most patients do not need a lot of testing before starting treatment.