This research investigates the impact of emotions and mental health on students' cumulative grade point average (CGPA) using machine learning classification algorithms while addressing data imbalances with the Synthetic Minority Oversampling Technique (SMOTE). Emotional well-being and mental health are acknowledged as vital determinants of academic achievement. Data imbalance, particularly in mental health metrics such as anxiety and depression, frequently compromises forecast accuracy. This study improves the accuracy of CGPA prediction based on emotional and mental health factors by utilizing SMOTE in machine learning models such as logistic regression and random forest. A dataset including 226 university students, including academic records and self-reported mental health evaluations, was evaluated. The random forest model attained an accuracy of 87.63%, exceeding the logistic regression model's accuracy of 86.56%. These findings emphasize the significant role of emotions and mental health in academic outcomes and validate SMOTE’s efficacy in addressing class imbalance. This work offers a fresh technique in educational data mining by revealing the possibility for improved academic achievement forecasts based on psychological characteristics, helping to the development of targeted therapies for students experiencing emotional issues. Implications for educational policy emphasize the significance of mental health support systems in promoting academic achievement. Subsequent research should investigate supplementary psychological variables and comprehensible models to improve predictive accuracy and facilitate evidence-based policymaking.