It's great that you are taking care of your mental and physical health, instead of falling prey to the myth that we all just need to keep our heads down and stick it out.
Can't say this too strongly: Do NOT tell your boss you plan to leave. Wait, wait, wait until you get another job because (especially in this economy) it could take longer than you think. People change jobs every, single day – it's business, not personal. Unless your boss is a complete jerk, and as long as you leave without burning bridges, he/she should have no incentive to give you a bad reference. (That's assuming you need one.)
Besides, I think you are hoping to be helpful by giving a heads up but in truth... your news is possibly the last thing your boss wants to deal with right now. He/she is probably as stressed, if not more so, than you! Giving him/her more to deal with, in the midst of major restructuring and a pandemic, may not be appreciated. I could see your boss potentially wondering "Why are you telling me this? What do you expect me to do about it?"
Re: layoff... If there's a list and you are on it, then it's a sealed deal. I seriously doubt this would change anything, either way.
Final suggestion: At least one former colleague who quit without another job said "I'll just contract" and it was a little bumpy. Nothing against contracting, but if you haven't done it before please be sure to lay the foundation up front. Research agencies, check out open roles, network with the reps. It can take time to get your foot in the door. Once you are successful with one gig, it's a lot more straightforward because the agency will present roles to you, before even posting them online.
Hang in there, and good luck!