BackgroundInpatient psychosomatic rehabilitation is a key treatment for patients with mental health issues. However, knowledge about critical success factors for beneficial treatment outcomes is scarce. The aim of this study was to evaluate the association of mentalizing and epistemic trust with the improvement of psychological distress during rehabilitation.MethodsIn this naturalistic longitudinal observational study, patients completed routine assessments of psychological distress (BSI), health-related quality of life (HRQOL; WHODAS), mentalizing (MZQ), and epistemic trust (ETMCQ) before (T1) and after (T2) psychosomatic rehabilitation. Repeated measures ANOVA (rANOVAs) and structural equation models (SEMs) were calculated to investigate the association of mentalizing and epistemic trust with the improvement in psychological distress.ResultsA total sample of n = 249 patients were included in the study. Improvement in mentalizing was correlated with improvement in depression (r = 0.36), anxiety (r = 0.46), and somatization (r = 0.23), as well as improved cognition (r = 0.36), social functioning (r = 0.33), and social participation (r = 0.48; all p < 0.001). Mentalizing partially mediated changes in psychological distress between T1 and T2: the direct association decreased from β = 0.69 to β = 0.57 and the explained variance increased from 47 to 61%. Decreases in epistemic mistrust (β = 0.42, 0.18–0.28; p < 0.001) and epistemic credulity (β = 0.19, 0.29–0.38; p < 0.001) and increases in epistemic trust (β = 0.42, 0.18–0.28; p < 0.001) significantly predicted improved mentalizing. A good model fit was found (χ2 = 3.248, p = 0.66; CFI = 0.99; TLI = 0.99; RMSEA = 0.000).ConclusionMentalizing was identified as a critical success factor in psychosomatic inpatient rehabilitation. A key component to increase mentalizing in this treatment context is the improvement of epistemic mistrust.