If you realise your passport has expired and you're supposed to go away soon, you should contact the authority that is in charge of issuing passports in your country. As long as the date of travel isn't too close, they might be able to arrange for an emergency passport to be issued ...