I think you should tell this to the bullies. That way they can tell their victims "Remember, I'm teaching you a valuable life lesson" after they're done beating them up and taking their lunch money.
Seriously though, being a social outcast isn't a valuable experience, nor is it healthy. It sucks, and it teaches you that your only options are to avoid the shitty people or suck it up as you put it. The reality is that you have a third option: being assertive. Believe it or not, you can make a shitty situation tolerable with a bit of honesty and frankness.
After all, there are going to be shitty people you can't avoid, and you'll explode if you just suck it up. But school doesn't teach geeks to do that. It teaches them to be docile and accept their shitty situation.
Our kids have been told that they will learn more about living in the world from school than they will of the Three Rs. And that it is an important skill, being able to cope with the stress. It just seems to be the best way to frame it for them: people are sometimes shitty. No sense in trying to figure out why or change them. Better spend your energies finding ways to avoid them when possible and suck it up the rest of the time. And I don't exclude teachers. I tell them that these are skills they'll need for the rest of their lives, because there will always be a boss, a cop, a teacher or some other person in a position of authority who may not be inclined to act to your advantage.
Then you move on. Build stuff. Learn to play an instrument. Write stuff. Anything that makes you feel good that doesn't rely on someone else's approval. Next thing you know, you're interesting and everybody wants to know you. It's a better use of your resources than whining, for sure.