Sometimes Tony wishes Pepper and Rhodey weren't so close to him. He thinks everything would be easier that way. And it's not only because he wants to keep them safe, though he likes to think that's the main reason. No, it's also because they know him too well, they know when he's pretending, when he's upset, when he's had enough and is about to snap... Long story short, they see right through the disguise he spent all his teen years creating and improving. And sometimes he can't bear that. Because every time he stops to think about how much they know about him, all his survival instincts kick in (old habit since his childhood) and even though his brain tells him they are to trust, that they are his family, there's always this little part of his mind that keeps repeating "Obadiah" every time that bigger part of his brain tries to reason, and, for a split second, he is utterly afraid, afraid of them betraying him, of them spilling all of his secrets and leaving him exposed for the world to see, broken and devastated and screwed up. Then the rational part of his mind takes control and all he feels is shame, because really, in his opinion, he doesn't deserve them, never has and never will. They're the best people he could think of knowing, and he dares to question their loyalty. Those occasions he doubts, luckily, are rare, and he knows that, in time, will disappear completely. Because, honestly, everything's been getting better over the years, he's progressing, and he is glad of that. He couldn't survive if everything was like it was before.
In the wake of Obadiah's betrayal, he would wake up from a nightmare and all his world would crumble down, turn into sand and spill through his fingers, and then he would think that everything was a lie, that everybody was there only to stab him in the back and watch him bleed out. Because he'd always been paranoid, always aware of a threat that lurked in the shadows and that most of the times only existed in his mind. But the important word there is "most". Because though normally being paranoid didn't pay off, the seldom times it did, he was a step ahead, and was ready. Anyways, after Obadiah, he started being even more paranoid (and was that even possible?) and started seeing threats everywhere. And those nightmares left him doubtful, wondering what was real and what was make believe, and he would stay awake, wondering if there was someone left he could trust. And then Pepper or Rhodey would come, and for a brief moment he would eye them warily. But trust and knowledge goes both ways, which meant he knew them both too well too, and a brief look into their eyes told him they truly cared about him, and would never betray him. And in time, that suspicion died away and seldom appeared, except for those moments Obadiah's shadow lurked more persistently (though he was glad to admit those were rare occasions now). So yeah, Tony could say he trusted them, and so far they completely deserved that trust Tony had in them.
Tony knows they both know everything about him, that if they wanted, they could have him at their mercy. But he also knows they care about him and would never hurt him, so he trusts them (those moments he doubts are disappearing) with not only his life, but with the information about him as well, and, surprisingly, he has found out he is more okay with that than he would have thought initially. But he isn't naïve, and he knows that information is also a burden, not only for him, but for them too, and he is not willing to share that with anybody else, at least not for now.
And then, when he was coming to terms with everything, when he was finally beginning to adapt to a routine and live without threats (too many anyway, there are always threats when you are Iron Man), the Chitauri invasion happened.
Tony knew what to do since the very moment Coulson stepped into his tower. If he was going to have to work with that bunch of people, he had to be prepared. And he came to one conclusion. He couldn't risk these people knowing him, taking a glimpse at the real, broken, paranoid Tony Stark. At least not yet, he couldn't predict what would happen in the future. So he put his façade on: narcissist, self-obsessed, lone wolf… and let his reputation take care of the rest. It hurt, though. It hurt more than he would dare to admit, to hear everything he feared he still was (and knew he once had been) and realize none of it was good. However, it was some kind of relief to realize no one outside his "family" had a hint of his real self. It was for the best. If people knew the real him… well, he didn't dare to think about the consequences, both for him and the world.
But afterwards, Tony felt like he had to do something for that group of heroes that had watched his back during the fight, so he invited them all to live at Stark Tower. But it didn't actually mean he trusted them, so he tried to keep his personal space until he figured out what to think of them. In the beginning it was easy to avoid them, with all the reparations the tower and the suit had to undergo he could spend the days and nights in his workshop. However, when everything was done, he was faced with the fact that he would have to resurface eventually. But he wasn't ready to open up to them yet, so he decided to keep his façade on a bit longer, see if he could trust them with the burden Pepper and Rhodey carried so well. Besides, during this initial stage, "being" a narcissist, worthless brat had its perks. This way, you could pretend to be arrogant, narcissist, a dick, in order to push and test their limits and learn how to sidestep tricky situations in the future, but without them noticing anything. They would blame it all on your personality, on your deficiencies and you would end up knowing them, without them finding out anything important about you.
But even Tony knew this was a temporary solution. If he wanted that team to actually success, they all needed to know each other. The problem is, Tony wasn't ready yet. He was afraid they would shove him away when they found out how screwed and broken he really was. He just needed the pertinent data to write his equations and solve them, and see if the answer was "They are worth trusting" or "Better luck next time". If it turned out it was the former, well, he was more than willing to (gradually) let them peer inside his real self and trust them. If it turned out to be the latter, well, the thing was mattered the most was the team's success, so he would carefully and quietly step out and let them go their own way.
So Tony just kept collecting data, trivial information he was sure they didn't even realize he noticed, and used it to write his equations. They were almost complete, he was sure of that. In a couple of days he would solve them and make the probably most important decision in his life. But until then, he could only pretend and hope for the best.