Schematic presentation of study design for survival and mediation analyses
*For TRD patients, index dates were the dates on which they received the third prescription before the study end date. Same index dates were assigned to the matched non-TRD patients in the same matching stratum, who did not have a date of the third prescription by definition. The matching was performed using propensity score based on age, gender, history of physical comorbidities, psychiatric and suicidal attempts as of 2014. The follow-up of both groups started on the index dates until death or the end of study. Index dates, censoring and covariates adjustment used were the same throughout survival, mediation and healthcare resource utilisation analyses.