Use that bad feeling to be self critical in a new way - it's a lesson that leads you to read your own work more carefully before putting it out. It's painful, but ultimately for me it has been positive reinforcement and has actually unlocked increased levels of self-confidence for me.
Every time I put out a piece of code with a strong view, or say something in a meeting, I stress about whether it was silly or just plain wrong – and I immediately go fact check myself on it to appease that anxiety. I've worked with many folks who do not do this, and they have a bad habit of making wild confident statements that turn out to be misguided or wrong and it's often too late when that is discovered. Use the feeling to your advantage instead of running from it.