As they will not give you an exit letter w/o paying the bank dues, and w/o outside funding to assist you.  It is noted that you did not discuss the reasons, valid or otherwise, for your "unexpected termination".  Ultimately you are stuck here and can only do one of three things.

1)  Easiest of the three is to blame yourself for not preparing better.  I would say that over 60% of workers here don't save anything for emergencies, so that would not be strange. 

2)  Go to your embassy and ask them for assistance, possibly a temporary passport (to replace a lost passport) that will allow you to exit without an exit letter.  This along with a letter from them for why you don't have an entry or work visa stamp may allow you to leave, if Italy is one of the 22 privledged countries with tourist visa-on-arrival. 

3)  Proceed further into debt using outside monies, though at least you can escape the trap you are in.  Of course, you could always get a temp passport from the embassy and try making your way to another nearby country to exit there so you can get a job elsewhere.

NOTE:  I'm not advising you to escape w/o paying the local debts that you created and cannot pay.  Only offering creative solutions that might allow you to pay those debts back.  Currently you cannot pay because you cannot work.  Circular argument, no solutions unless you can get out of the trap.  What the bank and country is trying to ensure is that you pay your debts before leaving.  Debt creates shortfall elsewhere which enables debt for other projects, etc.  What your former employers are trying to do, has not been posted by you, so we at QL would have no idea other than the bank debts.  Hope this was a little bit helpful.