You need to have confidence in order to make a change in your behavior, especially a big change like how you eat. Having confidence in your ability to change makes you a lot more optimistic about going on a diet plan - a big plus.
You can build up your self confidence to support your dieting and weight loss efforts by
reviewing past successes in other areas of your life
considering your own personal strengths
reframing the idea of past diet "failures" into the idea of past "tries"
thinking of past methods as needing revision
revising these methods so they'll work better for you
Please don't think of yourself as a hopeless case because you've tried and failed. Trying is an essential step on the way to succeeding.