Nobody expects their dog to get loose. Unfortunately, it happens.
The absolute best way to handle the situation is to be prepared for it. Train a rock solid recall. Plan for a worst-case scenario by creating a list of emergency phone numbers (shelter, vetís office, animal control, etc.) of people or groups who can help you look for your loose dog, and have that plus a recent picture of your pet saved to your computer and your phone. Bonus points if your dog is microchipped.
However, even if you are prepared, here are three things to do immediately if your dog gets loose.