The COVID-19 pandemic has had a dramatic impact on the mental state of teachers and students, who faced the necessity to teach and study online because of lockdown. The current study aimed to establish the association between attitudes toward the pandemic and the degree of stress, anxiety and depression among teachers and students. A total of 8051 participants constituted the sample. The Hospital Anxiety and Depression Scale (HADS) was used to assess depression and anxiety, and the PSS was used to assess stress. Principal component analysis was implemented to derive latent variables reflecting various attitudes toward the pandemic, and multinomial logistic models were implemented to establish the association between attitudes toward the pandemic and the degree of anxiety, stress and depression. The majority of participants, regardless of their social group, reported low levels of anxiety and depression and medium levels of stress. Overall, worry about COVID-19 itself is negatively associated with anxiety, stress and depression, whereas worry about the side effects of the pandemic has a positive association with those constructs. Additionally, social group moderates the relationship: specifically for teachers, the association between worry about COVID-19 and anxiety and depression tended to be positive. The theoretical explanation and practical implication of the findings are discussed.