Hi,
Self medicating can be disastrous. Exercise can work as a preventive treatment. If you feel ED has already set in, its in your best interest to either consult a Psychiatrist or a urologist so that you can get yourself assessed thoroughly and if a definite physical cause found, can be tackled, else you can be started on appropriate pharmacological or psychological treatment.
Next Steps
consult a psychiatrist or urologist in-person or via teleconsultation