BackgroundThe mental health consequences of the coronavirus disease (COVID-19) pandemic, community-wide interventions, and social media use during a pandemic are unclear. The first and most draconian interventions have been implemented in Wuhan, China, and these countermeasures have been increasingly deployed by countries around the world. ObjectiveThe aim of this study was to examine risk factors, including the use of social media, for probable anxiety and depression in the community and among health professionals in the epicenter, Wuhan, China. MethodsWe conducted an online survey via WeChat, the most widely used social media platform in China, which was administered to 1577 community-based adults and 214 health professionals in Wuhan. Probable anxiety and probable depression were assessed by the validated Generalized Anxiety Disorder-2 (cutoff ≥3) and Patient Health Questionnaire-2 (cutoff ≥3), respectively. A multivariable logistic regression analysis was used to examine factors associated with probable anxiety and probable depression. ResultsOf the 1577 community-based adults, about one-fifth of respondents reported probable anxiety (n=376, 23.84%, 95% CI 21.8-26.0) and probable depression (n=303, 19.21%, 95% CI 17.3-21.2). Similarly, of the 214 health professionals, about one-fifth of surveyed health professionals reported probable anxiety (n=47, 22.0%, 95% CI 16.6-28.1) or probable depression (n=41, 19.2%, 95% CI 14.1-25.1). Around one-third of community-based adults and health professionals spent ≥2 hours daily on COVID-19 news via social media. Close contact with individuals with COVID-19 and spending ≥2 hours daily on COVID-19 news via social media were associated with probable anxiety and depression in community-based adults. Social support was associated with less probable anxiety and depression in both health professionals and community-based adults. ConclusionsThe internet could be harnessed for telemedicine and restoring daily routines, yet caution is warranted toward spending excessive time searching for COVID-19 news on social media given the infodemic and emotional contagion through online social networks. Online platforms may be used to monitor the toll of the pandemic on mental health.