Educational psychology has been applied in the field of education for a long time. It can not only scientifically analyze human psychological activities, but also guide students' mental health in the education stage. Under the background that many teaching institutions have established students' mental health centers, the application of educational psychology can greatly improve the mental health level of students in teaching institutions. In addition, China students face a heavy academic burden. If we can't adjust our mental state scientifically, it will make it difficult for students to receive good mental health training at the critical stage of their growth. At present, the rapid development of China's social economy has caused profound and complex changes in many aspects of our society, which have greatly affected students in the education stage. Therefore, applying educational psychology to the teaching field to a greater extent can give scientific guidance to students' psychological growth, enable students to have a higher level of judgment on new things in society, consciously shield the influence of social adverse factors and maintain healthy growth. Students have a strong rebellious mentality in their growth stage, and they need to be unwilling to express their psychological feelings to their teachers. In this state, teachers' scientific guidance on educational psychology can make students feel the intimacy of educational psychology to a greater extent, so that students are willing to participate in psychological education activities and obtain a higher level of mental health.