There is growing evidence that exposure to the natural world (blue-green spaces) has potential benefits for mental health and well-being. The COVID-19 pandemic and the measures adopted to control it provide a natural experiment to investigate the links between nature exposure and mental health under extreme conditions. Using a survey distributed online and based on 6,080 responses, we tested three hypotheses: (1) people will show different levels of symptoms of depression and anxiety depending on the level of lockdown (severity) and ability to maintain contact with outdoor spaces; and (2) where access to outdoor public spaces was restricted, those with access to private outdoor spaces (2a) or even a green-blue nature view (2b) will show fewer symptoms of depression and anxiety and a more positive mood. Lockdown severity significantly affected mental health, while contact with nature helped people to cope with these impacts. The buffering effect of nature was especially relevant for those under strict lockdowns. People perceived that nature helped them to cope with lockdown measures; and emotions were more positive among individuals with accessible outdoor spaces and blue-green elements in their views. These findings can help decision-makers in developing potential future lockdown measures to mitigate the negative impacts, helping people to be more resilient and maintain better mental health.