Losing your passport when you are in a foreign country may happen more often than what people think. If this happens to you, you should first calm down. Once you have already calmed down enough to think, learn more about the country where you are in. Find the embassy and tell them about your current problem.
Describe your issue as accurately as possible. You will be given a temporary passport so that you can continue with your trip and go back to your home country. You will be given further instructions so that you can get a replacement for your lost passport. There are certain documents that you are required to have to prove your identity.
First off, you need to calm yourself and not panic. Gather your wits, then find, and contact the nearest US embassy. Tell them your problem and tell them about the dates when you will need the passport again so that they can arrange a temporary or permanent passport in the meantime. Then you need to file a police report if your passport was stolen.
Get your hands on some passport-sized photos of yourself before visiting the consulate. This will speed up the process. Find the relevant department and file in the complaint of the lost passport and the request for a new one. Go to the nearest consulate to get your new passport. You will require certain documents such as an ID to identify yourself.