Abstract Background Current evidence demonstrates that blood glucose fluctuation can be associated with depression and anxiety. The association among blood glucose fluctuation, traditional risk factors and emotional disorders in T2DM should be studied and clarified. Methods A total of 182 diabetic patients including 81 patients with depression or anxiety and 101 patients without emotional disorder were enrolled into this study. Data were obtained through medical history and questionnaire survey. Data were analyzed using appropriate statistical methods. Results The comparison results of basic information between the two groups showed that the differences of the proportion of female were statistically significant (p = 0.002). There was no statistical difference in laboratory examination indexes between the two groups, however, standard deviation of blood glucose (SDBG) and postprandial glucose excursion (PPGE) of the comorbidity group were significantly higher than that of control group (p = 0.032 and p = 0.037). The results of questionnaire survey showed that there were statistically significant differences in sleep quality, PSQI and dietary habit between the two groups (p