In my experience it is common for men to suffer ED following the failure of a long term relationship. This is caused by the hormones released by the body when stressed. In these circumstances the problem feeds on itself. A man starting a new relationship worries he won't be able to perform, and that anxiety in turn causes changes in the body which makes it likely that he will fail. This is treatable with counseling and/or medications.