People experience multiple changes in their lives after retirement, which can affect their mental health. In this paper, we examine the mediating impact of grandparental childcare in the effect of retirement on mental health among elderly women in Europe. We apply a semi-parametric estimation strategy to disentangle the total effect of retirement on mental health into a direct effect and an indirect effect mediated through grandparental childcare. We find that retirement directly leads to a significant increase in mental health problems. However, this effect is completely offset by a significant reduction in mental health problems generated by a mediating effect of grandparental childcare. As a result, the total effect of retirement on mental health is close to zero. We then examine country-specific heterogeneity in the provision of public childcare and find that the mediating effect unfolds its full compensating strength in countries in which grandparental childcare is supplemental to public childcare. Our results have important implications for designing old-age social policies.