ImportanceEmergency medicine (EM) physicians experience tremendous emotional health strain, which has been exacerbated during COVID-19, and many have taken to social media to express themselves.ObjectiveTo analyze social media content from academic EM physicians and resident physicians to investigate changes in content and language as indicators of their emotional well-being.Design, Setting, and ParticipantsThis cross-sectional study used machine learning and natural language processing of Twitter posts from self-described academic EM physicians and resident physicians between March 2018 and March 2022. Participants included academic EM physicians and resident physicians with publicly accessible posts (at least 300 total words across the posts) from the US counties with the top 10 COVID-19 case burdens. Data analysis was performed from June to September 2022.ExposureBeing an EM physician or resident physician who posted on Twitter.Main Outcomes and MeasuresSocial media content themes during the prepandemic period, during the pandemic, and across the phases of the pandemic were analyzed. Psychological constructs evaluated included anxiety, anger, depression, and loneliness. Positive and negative language sentiment within posts was measured.ResultsThis study identified 471 physicians with a total of 198 867 posts (mean [SD], 11 403 [18 998] words across posts; median [IQR], 3445 [1100-11 591] words across posts). The top 5 prepandemic themes included free open-access medical education (Cohen d, 0.44; 95% CI, 0.38-0.50), residency education (Cohen d, 0.43; 95% CI, 0.37-0.49), gun violence (Cohen d, 0.37; 95% CI, 0.32-0.44), quality improvement in health care (Cohen d, 0.33; 95% CI, 0.27-0.39), and professional resident associations (Cohen d, 0.33; 95% CI, 0.27-0.39). During the pandemic, themes were significantly related to healthy behaviors during COVID-19 (Cohen d, 0.83; 95% CI, 0.77-0.90), pandemic response (Cohen d, 0.71; 95% CI, 0.65-0.77), vaccines and vaccination (Cohen d, 0.60; 95% CI, 0.53-0.66), unstable housing and homelessness (Cohen d, 0.40; 95% CI, 0.34-0.47), and emotional support for others (Cohen d, 0.40; 95% CI, 0.34-0.46). Across the phases of the pandemic, thematic content within social media posts changed significantly. Compared with the prepandemic period, there was significantly less positive, and concordantly more negative, language used during COVID-19. Estimates of loneliness, anxiety, anger, and depression also increased significantly during COVID-19.Conclusions and RelevanceIn this cross-sectional study, key thematic shifts and increases in language related to anxiety, anger, depression, and loneliness were identified in the content posted on social media by academic EM physicians and resident physicians during the pandemic. Social media may provide a real-time and evolving landscape to evaluate thematic content and linguistics related to emotions and sentiment for health care workers.