TW: self harm, suicide

I am currently reading a few books on codependency, and they've been helping quite a bit. However recently my main struggle has been regulating my emotions. I'm worried because sometimes I feel such a deep sadness that won't go away, and one day it might just push me over the edge. Last night I ended up self harming after being clean for maybe a year. If I had a rope I probably would've attempted as well. It scares me that even though I know everything will be okay the next day, I'd rather end my own life than deal with the overwhelming sadness for a couple hours.
Sorry for the whole life story I'm trying to hit the min word requirement for posts, and I'm on mobile so idk how many characters I have left.

Anyways, although emotional regulation preferred, any books are welcome! Thanks so much.