A good team that absolutely has to work with an egotistical prick (who might be good at his job, but not nearly as good as he thinks he is) will eventually marginalize that entity as much as they theoretically can.
Anyone whose feelings are easily hurt through criticism will never be good at what they do. I write good code a lot of the time. Sometimes I write bad code when the situation calls for it. Sometimes I write bad code because my head is up my ass (but I almost see light!)
With that said, sometimes you need to just shut up and keep your head down, even if you're in charge. In the short term, it can be not only an effective strategy but the only way to do business.
In the long term, obviously you need to correct the problem. Whether that's through helping to grow the sour team member or culling them from the flock is of course a case-by-case decision.