The COVID-19 pandemic has been negatively associated with mental health. However, little is known about the temporal dynamics of mental health in the longer term of the pandemic. We aimed to investigate symptom levels and changes of depression, anxiety, posttraumatic stress, and loneliness spanning two years of the pandemic; and to examine associated risk factors. This five-wave, longitudinal online study from May 2020 to April 2022 included 636 adults (Mage = 39.5 years, SD = 16.11; 84.1% female) from the German general population who completed the international COVID-19 Mental Health Survey. Symptoms of anxiety (Generalized Anxiety Disorder-7; GAD-7), depression (Patient Health Questionnaire-9; PHQ-9), posttraumatic stress (PTSD Checklist for DSM-5; PCL-5), and loneliness (“Do you feel lonely?”) were assessed using mixed-effects models. Associations with anxiety and depressive symptoms were examined with having children, student status, financial worries, contamination fear, and loneliness. PHQ-9, GAD-7, PCL-5, and loneliness scores overall decreased throughout the two-year period of the pandemic but exhibited an increase during two national lockdowns. Controlled for significant associations with female gender and younger age, increased PHQ-9 and GAD-7 scores were associated with contamination fear, financial worries, and loneliness. No associations were found with having children and student status. Symptoms of depression, anxiety, posttraumatic stress, and loneliness decreased over time but varied along with the dynamics of the pandemic. Longitudinal monitoring of mental health in vulnerable subgroups is required, especially those of younger age, females, and the financially insecure.