Purpose: Loneliness disproportionately affects people with mental disorders, but associations with mental health outcomes in groups affected remain less well understood.
Method: A cohort of patients receiving mental healthcare on 30th June 2012 was assembled from a large mental health records database covering a south London catchment area. Recorded loneliness within the preceding 2 years was extracted using natural language processing and outcomes were measured between 30th June 2012 until 30th December 2019, except for survival which applied a censoring point of 6th December 2020 according to data available at the time of extraction.