First, call your new job and see if they can do anything to help. Also, get copies of everything associated with your new employment.
Step 2 depends. If old and new jobs are in the same city, see if a helpful person from either or both (assuming you and your soon-to-be-former employers are on good terms) can accompany you down to the naughty foreigner control office of the local PSB and either get an extension of your current permit, start the new one early, or grab a tourist visa to cover yourself for a few weeks.
If in different cities, you can try at both.
If all else fails, do everything you can to get everything for the new job lined up and take vacation in HK or Macao. Then pray you don't have to go back home to get a new Z visa.