I've been there and I'll tell you what I did.
Had a chat with my manager and HR and told them that the work has been messing with my mental health. I did not soften the blow. If anything, I made sure they understood what my days have been like. Went on a three week break. A weekend, a couple of days of break will not do any good. Take a long one , even if it is paid. In my case the HR understood the case and urged me to go on a break. During my break I had my work number off. Legit. No text, no calls. Either off or mute. I didn't open my chats to check anything. Didn't switch on my laptop once. I went back to reading during my break - something I really liked, talked to my friends, met them, learnt driving etc. Basically anything that brought me peace.
Before going on the break I had told the HR that I need a new role that allows me some breathing space. I kept pushing for it once I joined back and made it clear to my manager that I'll not be available after x hours and basically not work round the clock. I was lucky enough to move into a new role a month after I joined back and for the next 6 months - while the pace of the new role was slow I focussed on myself. Started working out and lost 10 kgs. Upskilled. Started therapy. The works. Once I was bored with this new role and moved into a bigger and challenging role with a healthier relationship with work and myself.
Hope this helps in some way. I didn't want to be prescriptive.