No-one likes being rejected, whether it's in matters of the heart, work or life. But it does happen. Rather than feel frustrated because things aren't going in the direction you want it to go, accept. Then work out
a) what went wrong,
b) what to do better for the next time, and
c) if what you want, is not what's best for you.
Take your lessons from the rejection, and turn them into stepping stones towards a direction that's right for you.