I think you should go and read "What do you care what other people think?" by Richard Feynman or "Surely You're Joking Mr. Feynman." He had an insatiable curiosity, was well liked, had a lot of fun, and a lot of the times was the smartest guy in the room. But the key fact from the book and his life is that he didn't take any of it too seriously.
Not to be offensive as I can only go off of the few sentences that you have written but it would appear to me that you have the problem that you are trying to "prove" to yourself that you are smart in every encounter and this manifests by trying to be the smartest guy in the room. The smartest guys that I know will say "I don't know" when asked a question that they don't know. That to me is the essence of intellectual confidence.