Never let rejections steer you away from your ultimate goal as a writer - to get published!
Too often writers (especially new writers) are prone to allowing one rejection to turn them into a Doubting Thomas, or even worse, a quitter.
Remember that one rejection is just one editor's opinion of your work. Be sure to submit your work to every appropriate market, giving you a better chance of getting published.
Learn to accept the fact that rejections will pile up, but all it takes is that one "yes" to make all your hard effort and persistence worth it!