If I stamped my passport for an international flight as we usually do before international departures and then I changed my mind for any reason, for example a family emergency reason. What's the process to cancel the stamp and leave the departure area?
The actual process would depend on your location and passport, but you can of course in principle be stamped back in.
You'd have technically left the country which stamped you out. Not departing, for whatever reason, would require you to, technically, enter the country again, with all due consequences.
You might have to purchase an (emergency?) visa on the spot. And I do suspect that some countries, notably countries that don't issue visas on the spot for passport holders of your country, might not have any procedure in place for an occurrence like you're describing. You might end up being forced to take your flight, be deported or be denied entry and be the next Terminal Man. :)