Sosuke Yamazaki is not an asshole. He isn’t a bad guy, a possessive prick, or an antagonist by any means. What Sosuke is is a scared, bitter kid who is pretty much suspended in limbo at the moment with absolutely no knowledge of where to go or what to do so he just keeps spinning in circles, hoping that he can find the answer.
It’s been confirmed in this episode that there is indeed something wrong with his shoulder and it’s pretty obvious that whatever is wrong is not only getting worse but will most likely prevent Sosuke from swimming at some point in the near future. Which means that Sosuke’s dream of swimming competitively and making it to a national level, is no longer possible. It’s gone, POOF, obliterated, literally impossible because his shoulder doesn’t function right anymore (and it’s also implied in a earlier moment that the reason behind it could be that Sosuke worked himself to hard which means he could also have a ton of self guilt over letting himself get to such a point and ruining his chance for the big time). And now, he is left without any reasoning or motivation - he has no idea what to do now that his days of swimming are basically numbered. He sought out Rin to spend his final days of being able to swim with him but is still faced with the massive, over looming inevitably of those days ending hanging over him. And well, all of that combined would make anyone distant, bitter, angry and prone to lashing out.
And Sosuke has lashed out and he’s had his bitter, angry moments but what stands out even more startlingly than those very, very, very, VERY few moments are ones like this because it would make sense for Sosuke to be jealous of Nitori. Nitori still has a chance to swim to Rin, a chance to make himself better so he can continue swimming with Rin, a chance to make it onto the competitive circuit - Nitori is literally in a place where he could end up having everything that Sosuke is slowly losing. And it would make sense for Sosuke to be bitter about that, to be jealous of Nitori but instead, he shows kindness and sympathy towards Nitori. He coaches him, gives him advice, gives him encouragement (in his own special way) and cautions him to be more careful. He helps him towards that chance to swim with Rin which Nitori wants more than anything in the world.
Instead of hanging onto that bitterness and anger which could so very easily turn to jealously and hate, Sosuke lets down his guard and that tough shield just a little bit to help someone who, in all respects, is very much like him. He reaches out to someone who will one day have something he’s lost and helps them obtain it because it is something that they want desperately, that they’re working their asses off to obtain. And Sosuke pretty much gains nothing from it - he has no reason to help Nitori, to drive to do so. I don’t hesitate much in saying that he’s most likely doing this because he wants to see Nitori succeed (and maybe there’s a little hope in him that somewhere along the way, he’ll begin to understand just what he should do).
So no, Sosuke isn’t a bad person, an asshole, a prick or anything like that. He’s a good kid who is scared, alone, stuck and lost. And I just hope someone, anyone, can help him out of that limbo and he can get out of those dark waters and finally see some sunlight.