This article is interesting: Social Rejection Can Inhibit Cognitive Ability Or Fuel Imaginative Thinking.
Lead author of the paper, Sharon Kim says:
“For people who already feel separate from the crowd, social rejection can be a form of validation.Rejection confirms for independent people what they already feel about themselves, that they’re not like others. For such people, that distinction is a positive one leading them to greater creativity.” (Source in above link)
The actual paper can be found here: Outside Advantage: Can Social Rejection Fuel Creative Thought?
In the Buddhist tradition, there is the idea that “negative conditions” can inspire us to move forward. For people who tend to think independently, having a few doors slam can be a good thing.