I surprisingly hear of imposter syndrome often and I have a very effective strategy for overcoming it.
Simply, focus on the work.
The work is what matters... Not mental or emotional constructs surrounding it.
If I'm feeling down, I just start hacking/coding... You either can do it or you can't, it's that simple. I don't really have time to sit around and feel depressed, worry about what others think, worry about how many followers I have on Twitter, etc.... When I'm WORKING.
One of the things I learned when I joined the software industry is that it is a results-based industry. Work pays off, not emotions, beliefs, happiness, sadness, etc...
And frankly, nobody really cares about all of that if you're doing a good job. Likewise, if you're not performing and you think you're great, that's also bad. So for me, what's worked is to just give up thinking about that type of stuff altogether and apply the thought to something useful... Like... My job duties.
If you feel so bad about your work, then, you can always take steps to improve such as code reviews, reading, taking extra courses, etc...
One more thing: At least for me, I've noticed a strong correlation between the logical brain and social stupidity. What I mean by this is after a long day of work/coding, my brain starts trying to apply logic and reasoning to social constructs like this. What I've found effective to mitigate this is to do something physical and shut down the logical brain. For me, lifting weights or cardio works great. After a workout, I am completely free from this strange disease. Perhaps walks, hobbies, beers, etc could help others.