First, I will say that I don't see any evidence that you've actually done yourself any real damage. You're feeling very insecure about this, but that's not surprising given that you apparently switched off of being a manager because your stress mas maxxed out. I can at least tell you that it's not nearly as bad as you've convinced yourself that it is - the series of events that you've described don't result in anything like "completely crushed my reputation". At worst, they might conclude that you are not well-suited for a management position. Honestly? That could be okay, because based on what you're saying here, they might be right. You tried a manager role for a few months and got overwhelmed and unhappy. You don't want a role that's gong to make you overwhelmed and unhappy. I know a number of people who actively avoid manager roles for just this reason, and they live better lives (in high level technical roles) as a result.
So, what should you do about it? Well, first, before you do anything drastic or try to make any serious changes, just get your feet back under you. Let yourself recover mentally and do your current job well until you get some of your confidence back. Make sure that you're a valuable, contributing member of the team in your old role (plus a little extra) and let yourself feel good about that. No company worth working for is unhappy to have competent, productive technical personnel on staff. Then, from that healthier, happier place, think about what kind of a role you actually want, and, in particular, what kind of a role you'd be happier in. Figure out what was making you unhappy about being a manager (not what you think now, but what you'll be able to conclude once you're feeling relaxed and more confident and looking back on it). Figure out what it's going to take to avoid those. Then start talking with people about what you actually want to transition to (if you still want to transition at all).
This solves three problems. The first is that it lets you get past your current psychological debt before you try to make any more changes. The second is that it gives you much better chances of getting a new role that's a fit for you, rather than one that's a promotion into a slot that won't actually be good for you. The third is that you'll actually have an answer for the recent events. You took some time, you figured out what didn't work, and you'll have a plan for why this new change won't have those issues. After all, if you're being useful and productive in the role you're in, and you want to transition to another, then nobody wants it to be a role you're going to fail in. Showing that you've put in some serious thought and care on your own part to avoiding that outcome will help reassure them on that concern as well.