Background: A growing body of scientific literature indicates that risk factors for COVID-19 contribute to a high level of psychological distress. However, there is no consensus on which factors contribute more to predicting psychological health. Objectives: The present study quantifies the importance of related risk factors on the level of psychological distress and further explores the threshold effect of each rick factor on the level of psychological distress. Both subjective and objective measures of risk factors are considered in the model. Methods: We sampled 937 individual items of data obtained from an online questionnaire between 20 January and 13 February 2020 in China. Objective risk factors were measured in terms of direct distance from respondents’ housing to the nearest COVID-19 hospital, direct distance from respondents’ housing to the nearest park, and the air quality index (AQI). Perceived risk factors were measured in regard to perceived distance to the nearest COVID-19 hospital, perceived air quality, and perceived environmental quality. Psychological distress was measured with the Kessler psychological distress scale K6 score. The following health risk factors and sociodemographic factors were considered: self-rated health level, physical health status, physical activity, current smoker or drinker, age, gender, marital status, educational attainment level, residence location, and household income level. A gradient boosting decision tree (GBDT) was used to analyse the data. Results: Health risk factors were the greatest contributors to predicting the level of psychological distress, with a relative importance of 42.32% among all influential factors. Objective risk factors had a stronger predictive power than perceived risk factors (23.49% vs. 16.26%). Furthermore, it was found that there was a dramatic rise in the moderate level of psychological distress regarding the threshold of AQI between 40 and 50, and 110 and 130, respectively. Gender-sensitive analysis revealed that women and men responded differently to psychological distress based on different risk factors. Conclusion: We found evidence that perceived indoor air quality played a more important role in predicting psychological distress compared to ambient air pollution during the COVID-19 pandemic.