I came back from a two-year caregiving gap and made a pretty visible error early on. Shipped something that broke a downstream process and wasn't caught until an ops person flagged it two days later. I was mortified. Newly re-onboarded, first real project, and I'd already caused noise.
What I did, and what I think actually helped:
Address it the same day, directly. Not in a team channel, not via a long email, just a direct message to my manager: 'I need to flag what happened with X. I should have caught that before it went out. Here's what broke, here's who's affected, here's what I'm doing to fix it right now.' No excuses, no backstory about the gap, no 'I think maybe it was also because...' Just facts and forward motion.
Write the postmortem yourself. Not asked for, just did it. Short, technical, blameless in format but honest about the root cause, which was my misunderstanding of the system behavior. Sent it to my manager before he asked. He forwarded it to the team and said it was a good model. That one moment did more for trust than probably anything else I did that quarter.
Don't grovel, but don't normalize it either. One apology is appropriate. Bringing it up again and again, asking 'do you still trust me', that signals anxiety more than accountability. Make it once, make it count, then execute well and let the work speak.
Give it time without being passive. Trust re-builds through consistent behavior, not one big gesture. I made sure my next three deliverables were early, well-communicated, and clean. Not perfect, but no surprises. That's the actual currency.
The thing I was most afraid of was that it would define me in my manager's eyes. It didn't. Most managers are more forgiving of mistakes than of poor judgment or hiding things. Hiding that error would have been much worse.
Hopefully this helps someone else who's in that awful 'I just messed up' moment.