The COVID-19 pandemic has greatly affected the personal and academic lives of undergraduates in Saudi Arabia. Although studies have suggested that COVID-19 increased the prevalence of psychological health problems among undergraduates, the associations between the risk of depression and safety practices and the influence of gender on these associations have not been studied in detail. A cross-sectional online survey was conducted among preparatory-year undergraduates in a large public university in Saudi Arabia during the outbreak. Depressive symptoms were assessed using the Center for Epidemiological Studies Depression (CES-D) Scale, and the practice of eight precautionary behaviors was also assessed. Data analysis was performed using the chi-square test, multiple linear regression and Spearman’s correlation coefficient. In total, 3044 undergraduates were surveyed. The mean age was 18.6 years (SD = 0.84), and 61.9% (n = 1883) of the participants were female. Overall, 47.7% of the participants reported having elevated depressive symptoms. Overall mean values of CES-D scores were higher among female undergraduates than that of male undergraduates (18.08 versus 15.56, p < 0.01). There were inverse and weak but significant relationships between the CES-D score and frequent cleaning of hands (male: r = −0.116, p < 0.01; female: r = −0.098, p < 0.01), wearing a mask when going out (male: r = −0.172, p < 0.01; female: r = −0.135, p < 0.01), keeping social distance (male: r = −0.117, p < 0.01; female: r = −0.147, p < 0.01), and covering the nose when sneezing (male: r = −0.202, p < 0.01; female: r = −0.115, p < 0.01). Regression analysis indicated that adherence to precautionary measures was a strong predictor of reduction of depressive symptoms in the target population. Male gender was also found to be an independent predictor of reduction of depressive symptoms. Depressive symptoms were highly prevalent in this target group, and female undergraduates seemed to be more vulnerable to developing such symptoms. Results also indicated that female undergraduates were more likely to implement the protective measures for COVID-19. The promotion of precautionary measures seems to be effective in reducing distress in this target population, but further research is needed to confirm our assertions.