If you do it right, rejection can be a gift.