I can only imagine how difficult it must be for you. It is concerning that you get suicidal thoughts, it is strongly advised that you speak to someone you trust, maybe a friend or a relative.
Certain amount of study related stress is normal, but when it is excessive you need to seek support. Your symptoms about forgetfulness and sleeplessness are related to anxiety, over worrying and over thinking. You seem to be having Panic Attacks with Major Depressive Disorder. Even in its sever form these can be treated. It is advised that you consult a professional who is trained to help you resolve these issues, a clinical psychologist will help you with treatment plan.
You will need a combined approach, consult a clinical psychologist to get a detailed evaluation done and for psychotherapy and consult a psychiatrist for medicine if need be.
Next Steps
Consult a clinical psychologist to get a detailed evaluation done to work on the problem from the root cause.