Mental health attitude has huge impacts on the improvement of mental health. In response to the ongoing damage the COVID-19 pandemic caused to the mental health of the Chinese people, this study aims to explore the factors associated with mental health attitude in China. To this end, we extract the key topics in mental health-related microblogs on Weibo, the Chinese equivalent of Twitter, using the structural topic modeling (STM) approach. An interaction term of sentiment polarity and time is put into the STM model to track the evolution of public sentiment towards the key topics over time. Through an in-depth analysis of 146,625 Weibo posts, this study captures 12 topics that are, in turn, classified into four factors as stigma (n = 54,559, 37.21%), mental health literacy (n = 32,199, 21.96%), public promotion (n = 30,747, 20.97%), and social support (n = 29,120, 19.86%). The results show that stigma is the primary factor inducing negative mental health attitudes in China as none of the topics related to this factor are considered positive. Mental health literacy, public promotion, and social support are the factors that could enhance positive attitudes towards mental health, since most of the topics related to these factors are identified as positive ones. The provision of tailored strategies for each of these factors could potentially improve the mental health attitudes of the Chinese people.