Start by downloading the most recent version from the T-mobile site:
http://www.t-mobile.com/bbupgrade/
If that doesn't work (or it's the current version you are on), try wiping the device.
And if that doesn't help, then it sounds like something is messed up internally and that it might be time for a new one.