Like Spiral said, suicidal thoughts and mental issues are literally the best reason to quit a job. I am sure that even if you talked with your employer, they would 100% agree on you leaving. I've left every job i've had in a good manner, maybe you can talk to your employer about it? You can tell him/her that you haven't been feeling well lately as you are dealing with some personal issues, and will be taking time off work to look for other alternatives. If you choose to go that way, i am sure your employer will really appreciate you coming up to them and being honest. I would definitely do that, but hide all emotions while doing it, just honesty and sincerity and don't get emotional or talk about feelings. As cold as that sounds, i've heard people in offices saying "keep that shit at home" or some stupid shit like that, which is pretty fucking sad! Good luck and all the best friend!
just saw your update, so ignore my stupid comment lol. well done <3