I'd like to give you some advice based on my own experience, and without making too many assumptions about you and what you haven't told us about your situation.

I absolutely believe there is a way for you to get through this. Don't be discouraged!

The first thing you must do is to kill the negative thought train. Don't panic, don't assume your career is over, that you have no hope, that it's going to get worse, that people are going to find out, that you'll get fired, etc.. Whatever you're fearful about as a result of realizing you're burnt out, try to set it aside for now because you don't need any more stress or worry. It sounds like you have time to think about what to do, so take that time, and don't put yourself under any pressure. Accept the state you're in. It's ok. This happens to many, many people, and you're not the only one. Moreover, your world doesn't sound like it's about to end. Relax about it, as much as you can.

I would echo what some others have said here about telling your boss/team: don't. What I think you need to do is look at what your day-to-day job is like, and see if there's anything you want to change. Is there anything that's really dragging you down? Do certain tasks or projects drive you crazy or make you feel depressed? Are you unhappy with your role in general? Do you hate your office and need to move? Is WFH making you unhappy, and you need to be back in a real office? Try to ponder it all, see if there's something you could change that would give you some quality of life improvement. When you think you have something, take that to your boss, and see what they can do about it. Don't engage in self-enfeeblement when you have that talk. You're entitled to set boundaries for yourself and ask for a change without having to divulge anything about your personal state of mind. Just say plainly that you're not feeling happy in your current role, and you'd like to give something else a try (i.e., whatever alternative you're going to present). Ask if that's possible now or at some point soon. If not, ask if there's something else available right now that they could offer you because you feel like you really need a change. Consider the options, but only choose one if it appeals to you, not just because you think need to choose one.

If it's a hard no from the boss or if there are no good options, then ok, no problem. Consider your next options. A job is a job. If things aren't so bad where you're at, then maybe it's worth staying. Ask yourself if perhaps you are too emotionally invested in having a "great career". If so, work on detaching emotionally. Show up each day when you have to, and leave when you can. It's ok to do a good job, and do it for the pay check. You don't have to accomplish anything great. You don't have to break your back for your employer. If you stay where you're at, look at ways that you can change little things to give yourself some feeling of agency and autonomy. For me, I had schedule flexibility, so I engaged in a daily act of rebellion where I would sleep in, show up in time for the daily stand-up, then do what I could until I felt like I was done for the day, and then I went home. If you don't want to stay where you're at, then take time to think about what you want to do next.

I can recommend seeking professional help. A good therapist is a very valuable disinterested third-party who can help you think everything through. Unless your situation is in dire straits, the best way forward is to make small but well-considered steps that will help create emotional and psychological space for yourself to heal. Oftentimes, what we think is the one problem causing us to burn out isn't actually the only problem contributing to the situation. A therapist can give you perspective on that. Perhaps anti-depressants might be a help for you, but a therapist can help you figure that out too. Don't sign up for the drugs straight away unless it is clearly needed.

I can also recommend walking, every day if you can, for as long as you're able or it remains enjoyable for you. Wooded areas and around lakes are great to walk around, but anywhere will do. It will help you relax and mull things over. It really will. Listen to music if you like, but also try it without. Stop and sit along the way. Take in the sky, the birds, the trees, the landscape. Just enjoy being there, and the beauty of nature. Think about whatever's on your mind, but don't force yourself to think of a solution. Let your mind wander. Space out. Relax.

Over time, you will be able to figure out what you need to change. It took me a couple of years, to be honest, but that's fine. It's not a race. The building (i.e., my life) wasn't burning, so I just focussed on taking my time because I didn't want to change too much too soon and end up back in the same hole down at some point down the road. I took care to sleep well (but not too much), walk regularly, and try do things I enjoyed (or used to enjoy). No pressure. If I didn't feel like doing anything intellectual on a particular day, I didn't. I got a lot of mileage out of housework, cooking, and walking on those days.

I believe you can figure this out. Hang in there, my friend!