Background To identify the potential biomarkers for predicting depression in diabetes mellitus using the support vector machine technique to analyze routine biochemical tests and vital signs between two groups: subjects with both diabetes mellitus and depression, and subjects with diabetes mellitus alone. Methods Electronic medical records upon admission and biochemical tests and vital signs of 135 patients with both diabetes mellitus and depression and 178 patients with diabetes mellitus alone were identified for this retrospective study. After the covariate regression analysis on age and sex, the two groups were classified by the recursive feature elimination-based support vector machine and the biomarkers were also identified by 10-fold cross validation. Specifically, the training data, evaluation data, and testing data were split for ranking the parameters, determine the optimal parameters, and assess classification performance. Results The experimental results identified 12 predictive biomarkers with classification accuracy of 74%. The 12 biomarkers are hydroxybutyrate, magnesium, hydroxybutyrate dehydrogenase, creatine kinase, total protein, high-density lipoprotein cholesterol, cholesterol, absolute value of the lymphocyte, blood urea nitrogen, chlorine, platelet count, and glutamyltranspeptidase. Receiver operating characteristic curve analysis was also used with area under the curve being 0.79. Conclusions Some biochemical parameters may be potential biomarkers to predict depression among the subjects with diabetes mellitus.