The coronavirus disease 2019 outbreak has the potential to trigger declines in individual mental health, potentially in the form of depressive symptoms. However, few studies have explored factors protective of mental health during the ongoing pandemic. For the sustainable development of individual health, this study was conducted during the pandemic and examines the relationship between gratitude and symptoms of depression, as well as the moderating effect of psychological capital. Latent variable structural equation modeling was used to analyze depressive symptoms and protective factors in 3123 college students. This study measures gratitude, depressive symptoms, and psychological capital, using the Gratitude Scale, Patient Health Questionnaire‐9, and the Positive Psychological Capital Questionnaire, respectively. Gratitude was negatively related to depressive symptoms, with psychological capital as a moderator of the relationship. Specifically, psychological capital had a powerful protective effect against depressive symptoms. Students with high psychological capital had lower depressive symptoms than those with low psychological capital, regardless of their level of gratitude. In students with low psychological capital, gratitude had a protective effect against depressive symptoms. These findings suggest that psychological capital is a powerful protective factor against depressive symptoms during a pandemic and improving psychological capital could enhance mental health.