One of the most painful lessons a new writer learns is that you have no control over what happens to your material after you submit. How many writers are discouraged when that first rejection letter arrives in the mailbox? Most likely, it was an impersonal form rejection with a copy of the market's writers guidelines attached.
I got spoiled. I sold my first two projects. They were both non-ficiton. The first fiction sale took four more years and at least a hundred rejections. They are painful at first. Sometimes you stop writing. Sometimes you keep writing but stop submitting. Sometimes you think the world is against you. Sometimes you think they don't recognize your brilliance. Sometimes you know you suck.
That's where most potential writers give up. If you take the craft seriously, and you read and write, eventually you learn. You learn how to write. You learn you aren't the only one out there struggling. You trade manuscripts and discover that you aren't the worst writer in the world. Somebody else makes your words look brilliant against their crud. You trade manuscripts and discover you aren't the best writer in the world, either. That's important to remember. No matter how good you are, there's always somebody better, at least at some aspect of the craft.
Later, you finally get that first sale. Hurrah! Then it takes forever to make the second one. You get frustrated, thinking you are a one-hit-wonder and the momentum starts to die.
It boils down to one thing. Persistence. If you continue to learn and work hard, you will make it. There are always plateaus. Sales come in waves. So do rejections.
The best way to deal with the rejections is to have a lot of material in the market. It gets you used to the rejections and most likely, you'll get a few sales in there, too. I have 40 unpublished short stories, most of them in the market right now. At times you can even get annoyed with a market for holding a manuscript forever. "Just reject the darn thing so I can send it to the next market."
It's just a game. Interesting thing is, I went through a period where all the writers I knew were being published in a certain publication, and I kept getting rejected from that market. In retrospect, the reason is obvious. I don't write what they publish. My stuff fits better into different markets. Once I figured that out, I started submitting to more appropriate markets and making sales.