The fantastic Warren Ellis, on being asked if he ever faces rejection, and if he's ever considered giving up writing:
Every writer faces rejection. There are two practical things to take from rejection. 1) the entity doing the rejecting is either stupid or didn’t need your thing. 2) you’re not good enough yet.
These are practical takeaways. Look at the thing you sent, a month after you sent it, and see how many flaws you can find in it. You can do better. I can do better. You might not be ready yet. Also, maybe you sent it to the wrong place. Perhaps it didn’t fit their editorial tone. Perhaps the humans there are just bloody idiots. That’s fine. At no point are you being officially declared Someone Who Should Not Write. Even if, as happened to me, an important editor does in fact tell you that you should consider another career. If this is what you want and you have something to say, keep going. Keep learning. Keep trying again.
There are undoubtedly still things in this life to submit to, but some random person telling you that you may not speak through art is definitely not one of them.