Oh Wetdogeared, sounds like you need a nice big warm hug! At least you weren't completely alone. Do you walk the puppy on a leash? Put all the important info on a luggage tag and attach it to the leash. And if you don't usually carry a cellphone, tuck some money into the luggage tag so you'll be able to at least go somewhere and make a phone call.
I've only been locked out of my place once. Hated that helpless feeling.
Dreamer