http://www.everydayhealth.com/type-1-diabetes/type-1-diabetes-sexual-issues.aspx
Hello,
Psychological reasons are one of the important causes of erectile dysfunction. Talk to your partner openly and discuss the relationship issues. Lifestyle choices like excessive smoking, being overweight and avoiding exercise are other possible causes. In such cases quitting smoking, losing excessive weight, and increasing physical activity may help some men regain sexual function.
In your case, diabetes may be one of the reasons and you may need to change your insulin dose along with diet control as well.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.