To improve erectile function, your doctor may treat
underlying medical causes such as heart disease and
diabetes. Changing certain habits, such as stopping
drug or alcohol use, may also improve erectile
function. Treating mental health problems, such as
relationship conflicts, depression or performance anxiety
can also help. If ED is a side effect of a prescribed
medication you are taking, your doctor may be able to
adjust the dose of your medication or switch you to a
different drug. Do not stop taking your medicine or
change any medications without talking to your doctor
first. If a blood test shows low testosterone levels,
testosterone replacement therapy may help.