Anybody who expresses suicidal thoughts or intentions should be taken very seriously.
That is what the folks who are medical professionals say. They are right. It is not good that you are dwelling on suicide. And it makes me unhappy to hear that you are so troubled.
There are some practical points to consider. I hope that you have someone that you can confide in. It is good that you are sharing with us on the forum but talking with someone face to face would be better.
One group of people that you can reach out to are priests. I am a Catholic and I know that if you call up a Catholic parish and ask to speak to a priest they will arrange to do so. You don't have to be a Catholic, or a Christian, you don't even have to believe in God. There is an advantage in that if you speak to these men within the context of confession their confidentiality is absolute. You may tell a priest anything within that context and they may never tell another living person under any circumstance. There are no exceptions. You could tell them you had murdered someone and they would not tell a soul. It is highly probable that they wouldn't grant you absolution, but the fact remains that these are people you can safely speak to.
You could call a suicide help line. They are there to help, and are said to be confidential. It is my understanding that they will not take any action unless you ask them to.
800-SUICIDE (800-784-2433) or 800-273-TALK (800-273-8255)
It is worth knowing that if you meet with a social worker, psychologist, or medical doctor, and tell them you are contemplating suicide they may have a legal obligation to take action, this might include having you temporarily committed to a psychiatric hospital.
In most USA jurisdictions, psychotherapists (at least the licensed ones) are mandated by state law to report certain behaviors to responsible authorities (e.g., the police, physicians, etc.). The exact definition of what is reportable varies from state to state, but generally has to do with the state’s desire to prevent people from harming themselves or others.
Also, if you have a friend amongst the faculty of your school they may give you advice on changing your area of study, if this has anything to do with your current predicament.
There are some areas of study which, depending on your temperament, can be a comfort. When my parents were ill I took comfort from studying mathematics. The very abstraction and the lack of any ambiguity of mathematics was, for me at least, comforting. Mathematics is not open to much in the way of interpretation. It does not care what your politics are. It does not care if you are young or old, sane or mad, kind or cruel, it only asks, "is it correct?"
If you wish to, you're welcome to contact me.
Do not harm yourself.