Let me tell you a funny story.
IS PATH WARM? is an
acronym created by the American Association of Suicidology to help counselors "remember the warning signs of suicide." It stands for ideation, substance abuse, purposelessness, anger, feeling trapped, hopelessness, withdrawal, anxiety, recklessness, and mood. So when you determine suicide as your purpose, you will start to study hard which will ease your anxiety since you will have to form a sort of routine to get better (or at least pass the exams). That will boost your mood up and you start to think that you should not be reckless if you want to graduate. So you eventually get better and better, create a small network along the way which will make you feel more free, less trapped. All this will lower your anger towards yourself and end your ideation.