How to help a friend stop caring about getting attention

My friend has said he's been feeling like a background character and been ranting about it. He first starting feeling this way because of his friend group sometimes ignoring him. He has anxiety and assumed that they weren't his friends and just people he talked to. Then he sees everyone else on the playground with multiple friends and gets depressed, thinking everyone else has something he dosent. I recently read a comment on another post saying about how friend groups guve the illusion of friends and that real friendships are 1 on 1, otherwise in a friend group, you may only have one or two persons you are kind of close with and the rest are just other people who are in the same proximity to you that you are likely not to be close with. Anyways when I was last in a proper friend group, I was kind of the "lowest", I was also being bullied for bad at football so I wasn't too worried about being the worst of the lot as I was constantly worrying about the bullying. Then, the next academic year, I was obsessed with running this side hustle I had, I was think about it all the day then go home and work on it. I didn't really have a friend group, just people I would go around and talk to when I got bored, but I didn't care as I was mostly checking if I got any sales during break times. Now this year it's gcses. I told him to focus on that but he says he's trying but still cries about having no attention and feeling like his friends aren't his actual friends and he didn't like the advice focus on yourself as he thought it didn't help with feeling like a background character. "Stop caring what people think" isn't helpful.

What I do have in mind is take him to teh wellbeing room during breaks (indoor room with mental health trained staff and activities with very few peopel) during breaks and lunches. If he dosent talk to anyone, he won't have any conversations to overthink and get upset about. He also wouldn't see other people getting attention out on the playground so he wouldn't get depressed that he feels he dosent have any

Anyone have anything else they could share?