Unplug from all the negative self-talk and plug into affirmations. Make a list of them -- all the great things about you as a writer and if you don't believe you deserve greatness, change your belief system. You made up the story you tell yourself now. You can revise that story anyway you want. You're the author of your own life, your own story.
All that happens by trash talking yourself or your writing and being filled with doubt and insecurity is that you lose energy and thus stop writing.
What good is that?!
Please. Be gentle with yourself. Believe you have been chosen to write your story for a purpose. The muse believes in you. It's your job to begin believing in yourself!