Share it with my colleagues, and also jot it down in a blog. I would prefer to share my experience with as many people as possible, hopefully that it can help other developers avoid pitfalls.
Celebrate madly, do a commit, and take a damn break. Then usually involves going back to delete all the garbage code that got written to identify the bug, which inevitably reintroduces the bug, and spend another hour or two to resolve it again, before finally having a nice clean patch to push up.
Even after so many years coding I usually fall into the same trap: the elation of finally finding the solution to hours of frustration drives me to keep on coding; without the reward of rest and reflection my foggy brain inevitably hits another problem, and I get frustrated and demotivated. It's only then that I finally take a break, and it doesn't feel nearly so good as it would've.
One day I'll learn from this.
Full Stack Web Developer
Mev-Rael
Executive Product Leader & Mentor for High-End Influencers and Brands @ mevrael.com