The COVID-19 pandemic is one of the most severe health crises of the century, with unprecedented public health measures to hinder the virus spreading. As a result, there has been an increase of mental health problems in the general population. The goals of this dissertation project are to understand how a pandemic affects mental health and to find effective mental health intervention targets. In addition, the results can help to understand the effect of involuntary social isolation on mental health. Specifically, I investigated how a lockdown stage changes the temporal dynamics between loneliness, stress-related behaviors and cognitions. Moreover, I investigated whether and how a lockdown impacts hypothalamic–pituitary–adrenal (HPA) axis functioning. Finally, I investigated whether COVID-19-related stressors and mood inertia (i.e., an indicator of mood regulation) persist to impact mental health beyond a lockdown stage. The dissertation project involves smartphone-based ecological momentary assessment (EMA), wrist-worn motion tracking and cortisol sampling in a German population, covering a no-lockdown and a lockdown stage amid the COVID-19 pandemic. Specifically, the following research questions were examined: 1. Do COVID-19 related stressors and mood inertia persist during a no-lockdown stage? 2. How does a lockdown, in comparison to a no-lockdown period, impact the temporal dynamics and network centrality of COVID-19 related stressors, physical activity, social contacts, stress and loneliness? 3. Is there a change of HPA axis activity during a lockdown compared to a no-lockdown? And how does a lockdown affect the association between loneliness, COVID-19-related stressors and HPA axis activity? Firstly, I found that COVID-19-related worries, perceived restriction, loneliness and mood inertia continued to affect mental health beyond a lockdown stage. Secondly, I found that a lockdown stage, compared to a no-lockdown stage, increases the impact of loneliness on subsequent stress-related cognitions and behaviors. In addition, a lockdown increases the centrality of loneliness (i.e., an index to identify variables that have a strong influence on other variables). Thirdly, I found higher salivary cortisol levels during lockdown than during a no-lockdown stage. Moreover, a lockdown stage moderates the association between loneliness and salivary cortisol. During a no-lockdown stage loneliness is associated with decreased levels of salivary cortisol, whereas during a lockdown stage loneliness is associated with increased levels of salivary cortisol. The main interpretation of the findings are: Firstly, a majority of pandemic-related stressors outlasts lockdown measures, which indicates the need for mental health interventions beyond a lockdown stage. Secondly, one reason for the mental health decline during a lockdown stage is the temporal and neuroendocrine impact of loneliness. Therefore, loneliness should be a priority for mental health intervention during a lockdown period. To explain the different temporal and neuroendocrine impact of loneliness during a lockdown, I develop the “contextual and cognitive model of loneliness”.