I think taking a walk is the best thing to do in those cases. Just stepping away from the computer.
In general, I've been trying to get over the dumb feeling by keeping a log of the stuff I'm good at and have done. That way, when I need to redo a resume or LinkedIn, I have one place with that info. It also would work for feeling dumb at work, since there would be proof I did know stuff, even if it didn't click this one time.
Like the three days I spent trying to fix a test that was failing because the data was being screwed up by a different way earlier in the test suite.
I may still be salty about that one.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.