Join Date: Jul 2005
Location: Seat 2A
Programs: AA EXP LT GLD 1MM, BA GLD, NH/UA*G, Hyatt GLB, Marr Tit LT PLT, IHG Dia, HH Dia, MGM NOIR, Hertz PC
Posts: 10,595
I only know the procedure when already through immigration:
Get in contact with nearest local consulate / embassy of the respective country and report the passport as missing.
They will issue you a certificate about this and it will be sufficient for the airline to check you in. It can also be used as 2nd piece of ID at your home countries immigration.
Some/most places require to show up in person !
Before immigration I would say bad luck. Without a valid passport you have the joy of taking the next flight home except it is your home country where you arrive at.