In this paper, we estimate the effects of the COVID‐19 pandemic on mental health in the UK. We use longitudinal micro data for the UK over the period 2009–20 to control for pre‐existing trends in mental health and construct individual‐specific counterfactual predictions for April 2020, against which the COVID‐19 mental health outcomes can be assessed. Our analysis reveals substantial effects at the population level, approximately equal in magnitude to the pre‐pandemic differences between the top and bottom quintiles of the income distribution. This overall effect was not distributed equally in the population – the pandemic had much bigger effects for young adults and for women, which are groups that already had lower levels of mental health before COVID‐19. Hence inequalities in mental health have been increased by the pandemic. Even larger effects are observed for measures of mental health that capture the number of problems reported or the fraction of the population reporting any frequent or severe problems, which more than doubled. Pre‐existing health vulnerabilities had no predictive power for subsequent changes in mental health.