If erectile dysfunction is caused by psychological reasons, counseling or sex therapy may help.