How do you reverse this mentality?
When I was in the military, I got put in charge of squads and platoons. Having to put everyone to work on a big task was a headache for me. There were a lot of people who did half-assed work, and I didn't want to have to spend all my time running around yelling at them to do their job right. I couldn't fire them or get rid of them, and I couldn't just leave them idle on the sidelines and make the good workers carry the whole load by themselves.
In time, though, I learned that everyone is good at something. As I got to know the bad workers better, I learned what they were good at and could usually find a niche for them where they would perform reasonably well. Across time, watching each of them as individuals and looking for their strong points, I could have the entire squad or platoon functioning effectively in some capacity. Also, I learned not to be a perfectionist. You work with what you've got. If your workforce isn't a good match for the job, then you do the best you can and accept that the result isn't going to be perfect.
So that's how I look at people today. When I start socializing with a new group of people, I accept that not all of them are going to be a good fit in my life. But I try to find out their strong points, try not to be a perfectionist, and try to figure out some way or place that they might fit into my life. And sooner or later I can usually find some way to enjoy their company and make them a friend.
That kind of mental/social exercise keeps me from getting cynical and viewing people in terms of herds of uninteresting people. It pulls me out of my head, makes me focus on people as individuals, and makes me pay attention to them in order to figure out their best qualities. I go along with them, try out the things they enjoy, and have some new experiences.
So that's my response. When I'm getting bored or feeling closed in on myself, I just start hanging around with a group of people and seeing what I can learn about them. It keeps me on my toes and exposes me to new things. It also renews my faith in humanity when I can find points of common interest with just about anyone sooner or later.