You should tell your boss but I don't know what your boss is like, what your financial picture looks like, etc. Obviously if you think they're gonna fire you right away then maybe get your ducks in a row first. If you can afford time off then maybe see if your company is cool with you taking a sabbatical or see if you just need to put in your notice and then take a few months to decompress and work on your mental and physical health before re-entering the workforce with (hopefully) better perspective on what led you there and how to avoid it moving forward.