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.