Visa cancelled - How to resign from rental contract without fine

I'm dealing with the fallowing issue:
I got fired and with this my working permit (+visa) is expiring.

I'm renting a house for 6 months now but have to leave the country. The lei is telling that a "forced transfer by the company" is a way avoiding to pay the fine of breaking the contract.
But this is not transferring but a sort of since I'm forced to change city (leave Brazil) due to my employer.
Any advice?

New topic