Yes, there is certainly a link between mental health and erectile dysfunction. But before you draw any conclusions, you need to ask yourself a few questions. How long has the erectile dysfunction persisted? Did it coincide with the diagnosis of depression or has it been present for a long time? Also, do you get morning erections? If yes, then the problem may indeed not be physical and purely psychological. A check-up with a urologist will answer all these questions.