Initially, being rejected feels like someone just stabbed you in the heart with a knife. Oh, and they didn’t bother to take it out.

According to psychologist Edward Smith from Columbia University, intense emotional pain activates the same neural pathways as physical pain. In other words, rejection can stimulate the same parts of the brain associated with the feelings you get when you stub your toe or spill a hot beverage on your lap.

No one goes out of their way to be rejected. However, it’s an inevitable part of life that we all must deal with at one time or another. Even though it may hurt in the present moment, getting rejected actually comes with some hidden advantages as well.

Here are 6 ways being rejected can actually be good for you:

1. It will enhance your creativity.

A Cornell study from 2012 found that rejection actually bolsters creativity, contrary to popular belief. Participants in the study learned that they could choose who to work with on a team project and later found out that no one picked them. Their results concluded that the participants with the most independence and confidence in their uniqueness dealt with social rejection the easiest.

So, as long as you own the fact that you don’t fit in and you were born to stand out, getting rejected might just push your creativity into overdrive and inspire you to go after that big project you’ve been putting off.

2. You will gain self-confidence.

The more you get rejected, the more apparent it is that other’s opinions of you don’t really matter. As long as you can walk into a room with your head held high and not worry if others will like you or not, getting rejected won’t phase you. In the beginning, rejection can feel like a huge blow to the ego. But over time, you learn the harsh truth that not everyone will like you. After accepting this, you can bounce back much quicker from rejection, and see the value in your own self-worth.

3. You will become more empathetic toward others.

You know how much rejection can hurt, and by going through this yourself, you can better understand other people who have been through the same, or worse, situations. According to a study by researchers from Miami University, people who relive the memories of getting rejected can more easily pick out genuine smiles. They speculate that the rejection encouraged the participants in the study to find a way to become accepted again, and because of this, they can more easily recognize sincerity.

So, rejection can enhance your ability to perceive other people’s emotions and could save you from falling into the same painful trap of exclusion once again.

4. It will give you a chance to improve yourself.

Obviously, you will learn a thing or two about yourself when someone rejects you. Thus, the experience will make you a much more resilient person overall. You could even ask the people who rejected you for some constructive criticism or feedback so that you can determine if you need to work on certain aspects of yourself, or if the person truly just didn’t resonate with you.

Every experience we face can serve as a teacher, and rejection is no exception to this. Take some time to reflect on the experience and figure out what you learned from it, as well as how you can improve as a person. Rejection doesn’t have to break you; it can do just the opposite if you allow it.

5. You won’t spend precious time obsessing over what the other person is thinking or feeling.

Sometimes, you just need to hear the blatant truth from someone in order to completely move on. Whether that means from your boss, your love interest, or your friend, it does no good to speculate and ruminate on someone or something when you could just get the cold, hard truth the first time.

So, when someone rejects you outright, don’t view it as a negative occurrence. Look at it as a positive experience, because they saved you a lot of valuable time that you might have spent mulling over your thoughts or the unhealthy, meticulous scrutiny of others’ feelings.

6. It makes you a more humble and well-rounded person.

Although rejection can make you feel more confident, it also can make you more humble as well. It teaches you that maybe you do have a thing or two you can work on. So by developing yourself further, you become a better person in the process. You see the world through a wider lens. And you learn to understand yourself and others better.

Look at rejection as a wonderful opportunity to humble yourself. You’ll soon realize that you, just like other humans, can’t ever be perfect. You will always disappoint someone, get excluded by someone, and hurt someone. However, that doesn’t mean you can’t learn from your experiences, and learn to love your imperfections, too.