During the COVID-19 pandemic, China implemented the "zero COVID-19" policy (enforcing mass testing, quarantine, lockdowns, etc.) for about three years to minimize infections. However, the longitudinal evidence on the mental health impact of COVID-19 containment policies in the Chinese context is limited. Drawing on six waves of national panel data covering the period of early 2020-late 2022, this study uses fixed-effects models to examine the relationship between the stringency of COVID-19 containment policies and individuals' depressive symptoms, and the extent to which this impact was mediated by psychosocial, economic, and health factors. The results show that individuals' depressive symptoms increased as COVID-19 containment policies became more stringent, and this held even after the COVID-19 incidence rate and other time-varying controls were accounted for. Individuals' locus of control, unemployment, and their or their household members' COVID-19 infection mediated more than half of the relationship between COVID-19 containment policies and depressive symptoms. Locus of control was the most prominent mediator, followed by unemployment, while COVID-19 infection played a marginal mediating role.