Based on the data from the China Health and Retirement Longitudinal Study(CHARLS)2020,this study investigated the correlation between lifestyle and depressive tendencies among the middle-aged population in China,aiming to provide a policy basis for promoting mental health.The findings indicated that middle-aged individuals with 6-9 hours of sleep per night,4-5 days of work per week,and a moderate annual income have lower levels of depression.In contrast,those with poor self-rated health,infrequent internet use,lower levels of literacy,and non-marital status tend to have higher depressive tendencies.Additionally,gender and age were found to moderate these relationships.Therefore,the study promoted a healthy lifestyle,ensuring adequate sleep duration and quality and implementing an optimized workweek system.We advocated improving the social security system and providing financial assistance and vocational retraining to increase personal annual income.We also recommended adhering to a holistic view of physical and mental health to provide precise care for middle-aged individuals,thereby enhancing their mental health level.