OP, your son sounds very much like mine was for a good six month period until quite recently.
He was really reluctant to phone friends to ask them to go out, having been previously out all the time. On NY eve, if I hadn't nagged him to have one of his (then, only two remaining) friends round he would have sat in his room by himself, later on FB there were loads of pics of his former friends at parites etc.
This started in about Nov last year. By Feb, it was clear that he'd self diagnosed depression, and when I looked into it, I agreed that he had the classic symptoms (low self worth, not wanting to socialise, poor sleeping, dropped hobbies etc). So, went to the GP. First one v. dismissive, 2nd one I went along as well and he was referred to a counsellor who he started to see immediately.
He found it immensely helpful to talk to this lady once a week, as she just listened, whereas I'm guilty of always trying to find a solution (nothing on this weekend - phone your friends) which came across to him as nagging.
At around the same time, he decided to do a new sport, having lost interest in the one he'd trained in 4 times a week for the last 2 years.
I think it was the combination of these two things which started him turning a corner. He still had lots of bad days when he said he was stupid, ugly, unsuccessful (he's none of those things), but they became much less frequent and I'd say since early May he's found his wings again. He's become much more confident, made new friends through his new sport and this made a big difference as he'd drifted away from his old friend s through quitting the old sport.
In early May, he and a friend set up a FB group arranging to have a field party (where everyone gets together with some beers around a camp fire near a local lake (I know, sounds horrific!), lots of people came and every weekend since then there's been some sort of field/lake/beach party where pretty much everyone's invited. It's much more democratic than waiting to be invited to a house party, which are few and far between.
So for the last 6 Saturdays, he's been out and whilst in theory, field parties sound like a nightmare, they all have a good time, they look after each other and pick up the mess.
He's like a completely different person to the one he was in Feb, he's back to being happy, confident in his popularity, working reasonably hard for his GCSEs and just giving off a sunny vibe again.
I do strongly recommend that you try to get your ds to the GP to get some counselling. Depression (if it is that and it could be transitory as it was with my ds) is extremely common in teenagers as they try to find their identity. Nagging didn't help my ds, but being able to talk to someone did.
After only about 8 sessions with the counsellor, she felt that he didn't need her any more. She told him he was a lovely young man, with loads of attributes and very bright, and that was really helpful. I remember when he came out from the last session and said she didn't want to see him any more, he looked like a weight had been lifted. He went straight to the flower shop and bought her a big bunch of tulips and dropped them off. The depressed DS would never have thought of that.
Hang in there. Sorry this is so long