The key to dealing with rejection is to accept the fact that you are not the one with the issue.
It's good to develop a healthy self-image. Tell and remind yourself at all times that you are the best and that you won't allow anyone to tell you anything else.
If you do this every now and then, you will not be put off when someone rejects your advancement.
You will come to the conclusion that it's the person that is missing out on what you would have brought to the table.
This also means that you have to develop yourself to be the best you can be. Wash yourself as regularly as possible, wear clean clothes and cut your hair often. Be your nest at all times. Learn and perfect a skill. Put on a good attitude. Do everything that would guarantee you that you are actually good and have something to offer.
The truth is that no matter how much you tell yourself you are the best, if you are not, you aren't and will keep getting rejected.
Another thing is to keep friends that believe in you and what you represent. People who have your back and always remind you about your potentials. Do everything together maintain a healthy self-image.
Finally, when people leave you, allow them go. It simply means they weren't good enough. Or, it could mean that their part in your story has been come to an end.
Never allow anyone make you doubt yourself. The truth is that you are the best. You are special. You are unique. They has never been and will never be anyone like you.
Cheers!