Abride - this is very sad isn't it.
I normally am of the opinion oh it's just a party when they are young, however these kind of things really sting when they are teens. It is horrible when you are a parent, as well.
My dd, who is 14 now, had a bad time for about 6 months at school. Some of her friends moved away, and she didn't have a real bedrock of close friends as we had moved up here when she ws in Yr 6. Anyway, to cut a very long story short, she was left out of things, very lonely, and ended up being bullied. We had to move schools in the end.
Anyway, reason why i am posting, her self esteem was at rock bottom. I was advised that the local air/army cadets are really good with kids who have esteem issues. She started with Air Cadets in October.
I cannor praise it highly enough. This kind of thing would emphatically not habe been my first choice of activity for a teenage daughter, however the people who run it couldn't be kinder, and she loves the whole thing. It has also been wonderful for her socially, she meets her air cadet friends out of cadets (not one of them goes to the same school as her) and is has paid dividends as her confidence has grown and she has made good friends at her new school.
I don't know if this would be your son's thing, however perhaps other things like extra curricular football, karate, running clubs or other kinds of clubs may suit him better. In any case it may well help to try and find him a new social circle outside school.
In the meantine best of luck, I know how rotten you must both feel.