Absolutely, don’t give up! Just because you aren’t published, doesn’t mean your work isn’t any good. There are lots of reasons why a publisher rejects your work and it may not have anything to do with your story. I have found there are 3-rights to getting published: the right publisher at the right time for the right story.
Keep writing. The more you write the better you will get.
Don’t be afraid of criticism. Ask yourself if the criticism is true, and if the answer is yes, have the courage to make the changes you need to make your work better.
Have fun writing—it’s the greatest part of being an author!