IntroductionDepression has become one of the most prevalent mental illnesses affecting the elderly in aging countries, i. e., in countries of the world whose population is slowly aging. It has become an important topic for scientists and policymakers to analyze how best to improve the elderly's mental health and save them from depression. The aim of this paper was to investigate whether and to what extent internet use may affect depression in the elderly. The heterogeneous effects of internet use on the elderly's depression across age, gender, and occupation were also investigated.MethodsThe data used in the present study were gathered from the China Health and Retirement Longitudinal Study that was conducted in 2018. The propensity score matching technique and the endogenous switch regression model were employed in this study to address potential endogeneity caused by both observed and unobserved factors.ResultsThe results of the present study show that the elderly who are relatively young, male, well educated, live in an urban area, or have a small family are more likely to use the internet. The elderly who have healthy eyes or good eyesight, those who are not employed in the agricultural sector, or those who are retired, and those who are not eligible to receive any subsistence allowance or drink wine have a higher probability of using the internet. We also find that internet use significantly reduces the elderly's depression status by 3.370 points, which is roughly equivalent to a reduction of 37.19%. Heterogeneity analysis on internet use reveals that the health effect is particularly effective for agricultural workers, female, or the older elderly.ConclusionThe results of the present study highlight the significant welfare effects brought about by the development of internet infrastructure. To improve the mental health of the elderly, the government should encourage them to adopt the internet. In particular, the needs of the elderly who are older, female, or have agricultural work should be paid more attention to motivate them to use the internet more to alleviate depression.