Locations and phone numbers are exactly the details I will not guess at, because they change and getting them wrong in an emergency is costly. The authoritative source is your country's foreign ministry website, which lists every embassy and consulate abroad with current addresses, emergency lines, and appointment systems; searching the ministry name plus your destination country gets you there in seconds. Do this before you travel, not during the crisis.
A few structural things worth knowing: the embassy sits in the capital, while consulates cover other major cities, and either can usually help with citizen emergencies; smaller countries may not have a mission everywhere, instead designating an embassy in a neighboring country or an arrangement where another friendly nation's consulate assists their citizens, which the ministry site explains. Most foreign ministries also run a 24-hour emergency consular line, often based at home, that works when the local mission is closed.
My standard pre-trip routine, and I recommend it to everyone: save the embassy address and emergency number in your phone contacts, screenshot them so they survive without signal, note them on the paper copy of your passport, and enroll in your country's traveler registration program so the embassy can push alerts and find you if the ground shifts. Five minutes, once, per trip.