Do you feel like a failure each time a piece of writing gets rejected or fails to be placed in a competition? You're not alone if so and that attitude is perfectly understandable ... but it's not the only way to look at things.
If you wrote something which matched the publisher/editor/judge's requirements in terms of word count, subject and layout, finished it to the best of your ability and sent it in (before any deadline) that's an achievement in itself and you should be proud of yourself. (If you didn't do all those things, there's a jolly good reason your piece wasn't accepted and you can put it right for next time.)
Have you been published or placed in a competition before? If you have there's no reason for that not to happen again. Keep trying.
Maybe you feel you've not yet had any success. Are you sure? No stories have been long listed? No busy editor thought your writing so good they took the time and trouble to send you something other than a standard rejection letter? Look at, or think back to, your earliest writing. Have you improved since then? Those things prove you're on the right track. Keep going.
Are you reading, learning and writing regularly? If you are, you're doing what just about every writer did before their first success - and keeps on doing. Don't quit.
The Insecure Writer's Support Group post on the first Wednesday of each month. It exists to ... well, I think you can work it out. All writers are welcome to join.