BackgroundDepressive symptoms are common in patients with coronary artery disease (CAD) and are associated with an unfavourable outcome. Establishing prognostic patient profiles prior to the beginning of mental health care may facilitate higher efficacy of targeted interventions. The aim of the current study was to identify sociodemographic and somatic predictors of depression outcome among depressed patients with CAD.MethodsBased on the dataset of the multicentre SPIRR-CAD randomised controlled trial (n = 570 patients with CAD and ≥ 8 points on the Hospital Anxiety and Depression Scale (HADS)), 141 potential sociodemographic and somatic predictors of the change in the HADS-D depression score from baseline to 18-month-follow-up were derived in two different ways. We screened for univariable association with response, using either analysis of (co)variance or logistic regression, respectively, both adjusted for baseline HADS-D value and treatment group. To guard against overfitting, multivariable association was evaluated by a linear or binomial (generalised) linear model with lasso regularisation, a machine learning approach. Outcome measures were the change in continuous HADS-D depression scores, as well as three established binary criteria. The Charlson Comorbidity Index (CCI) was calculated to assess possible influences of comorbidities on our results and was also entered in our machine learning approach.ResultsHigher age (p = 0.002), unknown previous myocardial infarction (p = 0.013), and a higher heart rate variability during numeracy tests (p = .020) were univariably associated with a favourable depression outcome, whereas hyperuricemia (p ≤ 0.003), higher triglycerides (p = 0.014), NYHA class III (p ≤ 0.028), state after resuscitation (p ≤ 0.042), intake of thyroid hormones (p = 0.007), antidiabetic drugs (p = 0.015), analgesic drugs (p = 0.027), beta blockers (p = 0.035), uric acid drugs (p ≤ 0.039), and anticholinergic drugs (p = 0.045) were associated with an adverse effect on the HADS-D depression score. In all analyses, no significant differences between study arms could be found and physical comorbidities also had no significant influence on our results.ConclusionOur findings may contribute to identification of somatic and sociodemographic predictors of depression outcome in patients with CAD. The unexpected effects of specific medication require further clarification and further research is needed to establish a causal association between depression outcome and our predictors.Trial registrationwww.clinicaltrials.gov NCT00705965 (registered 27th of June, 2008).www.isrctn.com ISRCTN76240576 (registered 27th of March, 2008).Electronic supplementary materialThe online version of this article (10.1186/s12888-019-2026-6) contains supplementary material, which is available to authorized users.