Usually unfurnished rentals are on a 3 month notice period which can be given at anytime. It sounds like you're renting some kind of furnished apartment with a minimum tenancy period ?
I think if you de-register (abmelden) and leave the country, any Germany contracts are cancelled if you provide proof of de-registration. You would literally need to move out, de-register and give it to the landlord.
Another option is to find a tenant to take over the rental agreement after agreeing with the landlord.
He maybe within his rights to keep your deposit though. This should have been paid into a deposit account where your signature and the landlords signature are required to get it paid out.