BackgroundWellbeing has a fundamental role in determining life expectancy and major depressive disorder (MDD) is one of the main modulating factors of wellbeing. This study evaluated the modulators of wellbeing in individuals with lifetime recurrent MDD (RMDD), single-episode MDD (SMDD) and no MDD in the UK Biobank.MethodsScores of happiness, meaningful life and satisfaction about functioning were condensed in a functioning-wellbeing score (FWS). We evaluated depression and anxiety characteristics, neuroticism-related traits, physical diseases, lifestyle and polygenic risk scores (PRSs) of psychiatric disorders. Other than individual predictors, we estimated the cumulative contribution to FWS of each group of predictors. We tested the indirect role of neuroticism on FWS through the modulation of depression manifestations using a mediation analysis.ResultsWe identified 47 966, 21 117 and 207 423 individuals with lifetime RMDD, SMDD and no MDD, respectively. Depression symptoms and personality showed the largest impact on FWS (variance explained ~20%), particularly self-harm, worthlessness feelings during the worst depression, chronic depression, loneliness and neuroticism. Personality played a stronger role in SMDD. Anxiety characteristics showed a higher effect in SMDD and no MDD groups. Neuroticism played indirect effects through specific depressive symptoms that modulated FWS. Physical diseases and lifestyle explained only 4–5% of FWS variance. The PRS of MDD showed the largest effect on FWS compared to other PRSs.ConclusionsThis was the first study to comprehensively evaluate the predictors of wellbeing in relation to the history of MDD. The identified variables are important to identify individuals at risk and promote wellbeing.