Objective To examine the association of mental health with everyday discrimination during the pandemic in a large and diverse cohort of the All of Us Research Program. Design, Setting, and Participants Using repeated assessments in the early months of the pandemic, mixed-effects models were fitted to assess the associations of discrimination with depressive symptoms and suicidal ideation, and inverse probability weights were applied to account for nonrandom probabilities of completing the voluntary survey. Main Outcomes and Measures The exposure and outcome measures were ascertained using the Everyday Discrimination Scale and the 9-item Patient Health Questionnaire (PHQ-9), respectively. Scores for PHQ-9 that were greater than or equal to 10 were classified as moderate to severe depressive symptoms, and any positive response to the ninth item of the PHQ-9 scale was considered as presenting suicidal ideation. Results A total of 62 651 individuals (mean [SD] age, 59.3 [15.9] years; female sex at birth, 41 084 [65.6%]) completed at least 1 assessment between May and July 2020. An association with significantly increased likelihood of moderate to severe depressive symptoms and suicidal ideation was observed as the levels of discrimination increased. There was a dose-response association, with 17.68-fold (95% CI, 13.49-23.17; P < .001) and 10.76-fold (95% CI, 7.82-14.80; P < .001) increases in the odds of moderate to severe depressive symptoms and suicidal ideation, respectively, on experiencing discrimination more than once a week. In addition, the association with depressive symptoms was greater when the main reason for discrimination was race, ancestry, or national origins among Hispanic or Latino participants at all 3 time points and among non-Hispanic Asian participants in May and June 2020. Furthermore, high levels of discrimination were as strongly associated with moderate to severe depressive symptoms as was history of prepandemic mood disorder diagnosis. Conclusions and Relevance In this large and diverse sample, increased levels of discrimination were associated with higher odds of experiencing moderate to severe depressive symptoms. This association was particularly evident when the main reason for discrimination was race, ancestry, or national origins among Hispanic or Latino participants and, early in the pandemic, among non-Hispanic Asian participants.