I don't think he was being nasty in any of those scenes, but I do find it a bit strange that he is so blind to Sherlock being on the point of collapse. Of course, I do understand that he had a huge crisis going on, and that does explain it. I just thought that somewhere, the friend-part or doctor-part of him would kick in and see what bad shape Sherlock was in.
I don't think it's fair to accuse John of being "sorry for himself", though. He is going through probably one of the worst shocks and crisis of his life, he is allowed to be furious. And hurt.