I used to be late for appointments all the time. It was embarrassing for me and annoying for everyone else who expected me to arrive on time. When dealing with an issue like this one, I think there's an expectation that you'll be able to snap your fingers, and *voila*, no more being late for appointments. Changing your way of behaving doesn't happen overnight, though... it takes practice. Preparing for things in advance and avoiding procrastination are skills you develop over time. When things don't happen easily for you (and when they seem to happen easily for everyone else), it can lead to those self-defeating thoughts you described.
I've taken a few measures to ensure I won't be late for appointments. One step is to pack everything I'll need the night before. I tested a few techniques before finding one that worked well for me. I physically put the things I need in front of my door, so I can't walk out of the apartment without those things (sometimes I'll even put the things I need in my car, so if I forget to bring something to the office, I can just run down to my car to get them). Another step is to give myself more time than I could possibly need in order to arrive on time. I may have a 9:00 AM appointment, and the office may only be a 30 minute drive from my apartment. I'll wake up at 7:00 AM or 7:30 AM, giving me more than enough time to eat breakfast, get dressed, and triple-check that I have everything before leaving. I'll often arrive 20-30 minutes early, but since I always have a book on hand, I'm not bored.
Once you begin to take steps that will reduce your stress (preparing in advance and not having to rush around the morning of the appointment), you'll begin to have more positive thoughts about yourself and your abilities, which will help with the self-defeatist attitude. If it's at all helpful, set up a "reward system" for yourself (e.g., "if I get there on time or early, I can grab something from Starbucks afterward and congratulate myself on a job well done!"). I tend to use one when it relates to procrastination at work.