Abstract Background Mental health issues among retirees have become increasingly concerning because the aging population presents a significant challenge globally, particularly in Western countries. Previous studies on this issue are plagued with bias owing to lacking panel data and estimation strategies. This study investigated the depression levels of European adults around the time of retirement. Methods We used data obtained from Waves 1–7 of the Survey of Health, Ageing, and Retirement in Europe (SHARE) to create panel data covering the 2004–2017 period. Wave 3 (SHARELIFE) was excluded from the sample because it provided mismatched information. Fixed-effects (FE) and fixed-effects instrumental variables (FE-IV) models with multiple imputations were employed to examine the impacts of retirement on mental health before and after retirement, where being over pension age (normal and early) was used as the instrument variable. Results Our results indicated that retirement based on aspirational motivations (β = − 0.115, p