AnonymousScholar, hello! I am a mental health professional, and I treat suicidal people. I am not, however, your mental health professional, and my replying to you here does not make me your mental health professional, or otherwise establish a clinician-patient relationship between us, and it does not constitute medical treatment.
I wanted to reach out to you because feeling suicidal is a rather big deal. It may not seem like that you. Often people in your situation experience so much suicidal feeling for so long, that it becomes rather ordinary to them. Like, "Oh yes, another paper, another day of wanting to kill myself, ho hum."
But it's not.
Posting to StackExchange, asking for pointers for how to write papers while feeling so much shame you feel suicidal is sort of like posting to ask how to focus on writing papers while the room around you is on fire. This being StackExchange, you'll get a bunch of friendly, helpful replies that try to answer your question as asked. But really, the answer to "how do I focus on writing my paper when the room is on fire" is not creative attentional hacks to focus despite the flames, it's evacuate the building! Similarly, the answer to "how do I manage to write while burning with shame to the point I want to die" is not really how to manage to write while feeling like you do, it's treating your agonizing shame before it kills you.
Because, realistically, the answer to "how do I write while feeling crippling shame" is, obviously, "with enormous difficulty, if at all, and great suffering". And you knew that already, but I think maybe you needed somebody to point out to you that that's not really negotiable, and that the problem here is not how to write, but how to feel less shame.
I'm glad to hear you've reached out to a psychologist in the past. I hope when you talked to them, you didn't just ask for pointers for writing papers while feeling shame, but I'm suspecting that's what happened. When you go to a mental health professional and say, "Hey, I'm having so much shame I'm having trouble doing my work" you get one sort of response - and sorry to say, it might not be much of a response, at an overworked university clinic. You can anticipate getting a very different response when you go to a mental health professional and say, "Hey, I'm having so much shame I want to commit suicide." That's a very, very big deal for mental health professionals. Really for most health professionals of any sort. We take that very seriously, and it's the sort of thing which justifies health systems mobilizing resources for you, that might not otherwise be available to you.
And if you did tell the psychologist that you were feeling suicidal in response to the shame you feel about your work, and they didn't respond with concern and additional resources, then I'm very sorry that happened. That doesn't sound right at all. I would beseech you to try again with a different mental health professional.
The standard of care where I am is that someone who is regularly experiencing the urge or inclination to kill themselves should, at the very least, be having a weekly treatment appointment with a psychotherapist. "Psychotherapist" is the general term for a whole bunch of different sorts of mental health professional who can provide psychotherapy, which is treatment for emotional problems. It includes psychologists, psychiatrists, counselors, social workers, and various other sorts of professional. Your jurisdiction may vary in what professions it credentials or licenses.
What the psychotherapist would help a person in your situation with is feeling less shame. Unfortunately, that's not something that can be fixed overnight. Would that it were so! Alas, as you have probably noticed, pernicious thoughts and feelings can be very tenacious and hard to shift. It can take a while, and quite a lot of effort. It's easier with professional help and guidance.
I don't know where on the planet you are, and even if I knew, I might not know what resources are available to you besides your university's counseling service. I recently learned that at one school near me – MIT – the students all have a commercial health insurance product that they can take off campus to get treated anywhere that health insurance is accepted; the MIT counseling center only does very brief therapy, and if a student needs longer or more involved treatment, they're expected to use their insurance to go find a psychotherapist in the community. Most MIT students don't even know this is an option. So I encourage you to look into what options for treatment you might have, and not know about.
In much shorter term, though, I wanted to mention: if your suicidal feelings get so bad that you think you might act on them to end your life, or if you resolve to act on them, that's a medical emergency and you should call for an ambulance to take you to a hospital (call 911 in the USA and Canada, 000 in Australia, 112 in the EU, 111 in NZ, and 999 in the UK, Ireland, Singapore, Hong Kong and a bunch of other places), or, if you can manage it, take yourself to an emergency medical service (e.g. an "Emergency Room" or "Urgent Care" in the USA or an "A&E" in Britian).
If you're struggling with suicidal feelings, but aren't thinking of killing yourself imminently, you can in some countries and locations call a suicide hotline to talk to a trained listener who can provide emotional support and help you access mental health treatment resources.
In the USA, you can call 1 (800) 273-8255 for the National Suicide Prevention Lifeline. For elsewhere, Wikipedia has a list of suicide hotlines by country.
Please take your condition very seriously, and seek professional help. The amount of suffering you're going through is terrible – and needless. There is help in the world for what you're struggling with, but you may have to let it know where you are and how badly you need it for it to reach you.
And then it would be a whole lot easier for you to write research papers.