It sounds like you have emotional issues to get through before you are ready to comit to a dog. It's a challenge at times.
I would also look around for a dog at one of the rescue organisations - that way you have an idea of what to expect. A shelter dog can be very iffy - since aggression toward other dogs and other kinks have not been checked yet. No matter how old or young the dog is, you will have to do training.
I think it is really imperative for you to get the emotional issues sorted through first, as it is important for both the dog and you to be in a stable environment. The first few weeks/months are hard for both the dog and the owner - so it is important that you overcome your self esteem issues before pursuing adoption of a dog.