Under the background of the rapid development of new media and big data technology, it is found that students in colleges and universities have certain psychological problems, and the improvement of students’ mental health and the quality of education in colleges and universities is a topic of current pedagogical focus. According to the data flow model has a good application prospect in the field of education, a path of mental health education course content optimization based on the data flow model is designed from the three aspects of curriculum system, lecture content and teaching mode. In order to verify the real effect of its path, a corresponding validation research plan is formulated, and the independent sample t-test is used to validate and analyze the path. After a period of experimental intervention, the experimental group and the control group showed significant differences in learning motivation, interpersonal relationship, and emotional intelligence (P<0.05), which concluded that the introduction of the data flow model is beneficial to the development of students' mental health at the level of traditional mental health education curriculum content.