Implementing mental health education (MHE) in schools is vital for students' psychological well-being. Subject infiltration integrates psychological factors into subject learning, promoting healthy development. However, English learning can introduce issues like self-confidence and language anxiety. Early identification of mental health problems (MHP) is crucial. This study, rooted in humanistic psychology and constructivism, explores affective factors, strategies, teaching, and English listening. The algorithm, based on the DeepPsy model, shows promise, identifying 75% of students with MHP. This research aids universities in offering timely support to high-risk students, minimizing long-term harm. The algorithm contributes to a healthier learning environment by enhancing English teaching and addressing mental health issues early.