Background In 2020–2021, many European countries put in place temporary lockdown measures due to the increase in COVID-19 cases, although such measures have negative psychological effects. As pre-existing mental disorders are a risk factor of negative psychological consequences during pandemics, it is important to identify specific predictors of psychological distress caused by restrictive measures in patients with history of depressive episodes. The aims of this study were i) to determine whether depressive, anxious symptomatology and suicidal ideation (i.e. mental health outcomes) were influenced by stay-at-home orders, and ii) to identify the psychosocial dimensions that influenced these mental health outcomes in patients with pre-existing depression during/after COVID-19-related restrictions. Methods This study concerned 296 psychiatric patients with history of depressive episode in the 2 years before the COVID-19 outbreak. Participants received a computerized form to self-measure depression, suicidal ideation, and anxiety (5 times during 2020–2021, two lockdown periods and three non- lockdown periods). Loneliness, boredom, habits, substance consumption, and access to psychiatric care also were self-reported. Results Loneliness and boredom were independent risk factors of anxiety and depression, and their changes dynamically affected the psychological state. Suicidal ideation was mostly driven by depressive symptomatology. Conclusions Our results highlight the need to target these dimensions in the most vulnerable patients in order to prevent the psychological consequences of the repeated COVID-19-related restrictions.