Can’t stop thinking about dying

I couldn’t actually go through with it but I can’t stop thinking about how much I want to die. I’ve been gong down a dark tunnel for a long time and even antidepressants don’t help.