Presently, a significant number of students enrolled in colleges and universities encounter mental health challenges, including academic stress and difficulties in interpersonal relationships. These factors contribute to a decline in mental well-being and necessitate prompt intervention and assistance. The automation of mental health identification in students greatly benefits from the implementation of intelligent emotion recognition systems. Through the analysis of students’ emotional states, educational institutions can gain a deeper understanding of students’ mental well-being, enabling them to promptly identify and address any issues and offer more complete care and support to students. This paper proposes a method for automated emotion recognition that is driven by data. The method is developed based on the provided background information. The proposed approach incorporates a feature fusion mechanism and an attention mechanism into the ResNet-34 model. This integration enhances the model’s capability to analyze intricate details and subsequently improves its classification performance when applied to electroencephalography (EEG) signals. This paper introduces several key innovations. First, an optimization technique is applied to the input component of the model, enabling multifeature fusion. Second, an attention mechanism is incorporated after the residual network module, enabling the model to prioritize parts that contribute to classification and enhance feature extraction. Finally, the network parameters are optimized using both softmax loss and center loss functions. The findings from the analysis of the sentiment EEG public data SJTU Emotion EEG Dataset (SEED) indicate that the proposed sentiment recognition approach not only enhances the classification performance of the model on the sentiment EEG data but also improves the stability of the results. This paper presents a novel approach that enables automatic and efficient recognition of students’ emotions on commonly used platforms. The findings of this study hold significant implications for mental health assessment and detection in real-life production settings, offering substantial reference value in this domain.