Hi there..I can understand your concern. Don't rush into decisions. Erectile dysfunction could be due to many reasons. Anxiety being the most. So first try relaxation techniques and distraction method. Then try to cut down on any habits like alcohol, smoking or drugs. This will help prolong erection. If there's no improvement then you must be investigated for any comorbidities like diabetes hypertension hypercholestrolemia. Treating these comorbidities also can help. Medically there are many options like oral medications and topical creams. If the above conservative measure do not help kindly consult a psychiatrist for medical therapy. Also the pain the scrotum could also be causing erectile dysfunction. Kindly get it checked by a general surgeon.