BackgroundThis longitudinal, multicenter web-based study explored the trajectories of depressive and anxiety symptoms during the COVID-19 pandemic among physicians over two years.MethodsAt four measurement points between 4/2020 and 5/2022 depressive (Patient Health Questionnaire-2, PHQ-2) and anxiety symptoms (Generalized Anxiety Disorder Scale-2, GAD-2) among physicians in German hospitals were assessed. Time, gender and age effects were analyzed with linear mixed regression models. Comparisons with norm values for the German population during the COVID-19 pandemic were also performed and frequencies of probable depression and anxiety are reported.ResultsThe physicians (N = 340) showed a significant increase of depressive symptoms from T1 (M = 1.35, SD = 1.33) to T4 (M = 1.64, SD = 1.34) (p < .001) and of anxiety symptoms from T1 (M = 1.35, SD = 1.42) to T2 (M = 1.59, SD = 1.43) (p = .024). The main effect of gender was only significant for anxiety symptoms (p = .001): women demonstrated higher scores than men. A significant age class difference was observed only for depressive symptoms: the youngest age group (18–40 years) revealed higher values than the oldest group (> 50 years, p = .003). As compared to the general population, the physicians reported significantly elevated PHQ-2 (T1: M = 1.35, SD = 1.33; T2: M = 1.53, SD = 1.37; T3: M = 1.55, SD = 1.40; T4: M = 1.64, SD = 1.34) and GAD-2 scores (T1: M = 1.35, SD = 1.42; T2: M = 1.59, SD = 1.43; T3: M = 1.61, SD = 1.57; T4: M = 1.49, SD = 1.46) for all measurement points (all p < .001). The frequencies of probable depression (PHQ-2 ≥ 3) and anxiety (GAD-2 ≥ 3) were: 14.1% and 17.0% (T1), 16.5% and 21.9% (T2), 17.8% and 22.6% (T3) and 18.5% and 17.3% (T4), respectively.ConclusionsMental distress of physicians in German hospitals has increased in the course of the COVID-19 pandemic with gender and age-related differences. Possible causes should be explored and regular monitoring of mental health and prevention programmes for physicians should be established.Trial registrationThe study was registered on ClinicalTrials (DRKS-ID: DRKS00021268) on 9.4.2020.