In view of the progress and development of society and the accelerated pace of life, the demand for personnel is increasing. Students’ psychology is not yet fully mature, so students are often unable to withstand these pressures, resulting in many psychological discomfort or problems. The normal life, learning, and growth of students are affected. Considering the increasing number of psychological problems among students, education on students’ mental health has become particularly important, which has become an important part of students’ work. Looking at the actual case of higher education, the development of students’ mental health education is very unbalanced, and there are vague understandings and deviations in practice. Many people believe that the main purpose of student mental health education is to focus on counseling and therapy for some students with mental health problems. These people have no concept of mental illness prevention and mental health education development. The result is that mental health education has not been well publicized and promoted, and mental health education has not done a good job. For the current situation, this paper analyzed college students’ mental health education through a research experiment on big data algorithms. The experimental data showed that there were 40 students who thought that the psychological education course after the optimization of big data was very helpful in life, accounting for 40.6% of the total; there were 30 people, accounting for 30.7%, who thought that there was some help; 19 people, accounting for 18.81%, who thought that there was little help; and 10 people, accounting for 9.9%, who thought that there was no help. Compared with before optimization, the number of students who thought it was very helpful increased by 35, and the number of students who thought it was not helpful decreased by 20. From these data, it could be seen that mental health education played an important role in promoting the harmonious development of students’ body and mind, improving mental health, and helping students survive in the rapidly developing social competition in the future.