Key PointsQuestionIs SARS-CoV-2 infection associated with subsequent long-term depression or anxiety?FindingsIn this propensity score–matched, population-based cohort study of 45 260 participants, COVID-19–like symptoms, but not SARS-CoV-2 infection, during the first months of the pandemic were associated with an increased occurrence of subsequent depression and anxiety 8 months or more after the occurrence of COVID-19–like symptoms, even when SARS-CoV-2 serologic test results were negative.MeaningThese findings suggest that SARS-CoV-2 infection is not a risk factor for long-term mental health issues; however, further research is needed to identify factors other than SARS-CoV-2 infection implied in the association between COVID-19–like symptoms and poor mental health outcomes.