Unless the handset is part of the contract, you cannot. Contact what passes as T-Mobile's customer service, explain the problems and see what you can do. If the handset is in warranty, get it replaced but this, in itself, is not sufficient grounds for contract termination.
SHARK!
For every positive action, there's an equal and opposite government plan.