Hi, that sounds a lot like impulse, which imo is best to avoid.
I also went through bursts of despair then hope then despair then hope in a matter of days. Like literally just waking up like that or mid day. And I know in those bad moments it presents itself as so urgent and clear and inevitable, but then comes the next day and I'm rather glad.
If you were happy yesterday, I'd say there's high chances you shouldn't be killing yourself right now and you can be happy soon too. It's just such a short time span and it sounds to me a lot more like a crisis you are having right now, for which I'm sorry, it's awful, but I'd advise you to try to take a walk, listen to music or distract yourself however you find ways to and may work.
I can only recommend you that, I know those days well.
lots of hugs regardless <3