This may be my middle name. I often tell people that I sold the first book I wrote and that it had been re-written 17 times. This may be a slight exaggeration but it's true about the revisions. This was in the days when publishers nourished writers. Each rejection pointed a different thing that I had to work on to make the book ready to print. What I received from these generous editors was a crash course in writing. I can remember some of the comments. "Dialogue stilted." So I went in and made the dialogue much clearer and specific to each character. "Are they living in a vacuum?" This time I went back to put in settings. Some pointed out flaws in the plot and I worked on those. You get the picture. What persistence did way pay off by a sale. That book was reprinted in England and was serialized in a weekly paper. All these things brought in a bit of money. Another thing I learned from all this was to work on each book until it was finished. No jumping around to starting a book and hitting a stone wall and putting it aside. I chip at the wall until there's a break through.
So if you feel discouraged, just remember that persistence pays. I have my dream now. I'm no NY Times best seller but I have fans who will buy everything I write. And they're growing in number. That's another reward of persistence.