Influenced by some traditional thinking, some college student managers do not recognize the importance of mental health education and fail to effectively integrate mental health education into student management, resulting in poor student management results. This paper proposes an improved optimization scheme for the ID3 algorithm, using the improved C4-5 algorithm to construct a decision tree model, selecting information gain and gain rate as the attribute measure of the model and deciding the split form of the sample. Succeeding pruning operations are used to correct model errors, and the rules are described in the form of TF-THEN. Mental health education is the application of the constructed data model. The effectiveness of student management after mental health education was differentially analyzed across the different identity perspectives of teachers and students. There are significant differences between teachers and students in the dimensions of practice effect, strengths evaluation, and direction of improvement, with p-values less than 0.05. In the study of the effectiveness of student management on students’ mental health, after the implementation of student management work, there are significant differences between the experimental group of students and the control group in the dimensions of self-confidence, emotional intelligence, and frustration tolerance, with a difference of 4.61, 1.6, and 7.9 points, respectively. There is a reciprocal interactive relationship between student management and mental health education.