Please, please try to stop being so judgmental about this young man. There may be things going on with that you don’t understand.
Obviously it’s impossible to diagnose on an internet forum, going from information in a post like this, but it could be that your friend has something like Asperger’s Syndrome. I have a nephew who was recently diagnosed, finally, at age 20. Often people with Asperger’s appear so nearly “normal” that they come off as being jerks, when in reality their brains are actually wired differently so that things are that easy for us “neurotypical” (NT) folks are like climbing Mt. Everest for them.
Many of the things that you describe in your post are precisely the expressions of Asperger’s Syndrome. The difficulty in establishing relationships, hygiene issues, pickiness and stubborness, resisting authority, defensiveness, depression over their failures . . . those are all common for folks with Asperger’s.
It’s heartbreaking, because inside they have exactly the same feelings as NTs do, but because of an inability to pick up on social cues and to know what the best responses are to make in any kind of social situation, they offend or put people off over and over and over, without meaning to do so, at all. And so they often tend to retreat into their computers, the one space they can kind of control, for all kinds of interactions.
Asperger’s folks are almost always very bright, though! And their high intelligence level is a saving grace, because with the right kind of coaching and mentoring (not so much “therapy”), they can learn the skills they need to succeed in life.
So if you care for your friend, please ask him to be evaluated. And if that does turn out to be the diagnosis, there are many coaches and mentors out there who have successfully helped people with Asperger’s turn ther lives around dramatically.
Please be a force for his positive future! A caring friend can make a world of difference.