Jaa, did you have this contract reviewed by an attorney before you signed it? It sounds terrible. I'd take it to a contract lawyer and have it reviewed again, to make sure they can hold you to it; I can't see the if you wanted to take an oil painting class, cooking class, dance class, acting class, that they could legally prohibit you.
Even with a contract you've already signed, a court can deem parts of it unconscionable and void those parts.
Assuming the contract is 100% enforceable, is it really what you want? It might be worth it to you to breach the contract, give up the remainder of your pension (I know that sounds awful), and go on with your life. With all the years you've put in, that sounds terrible, but it's something for you to consider - you need to weigh what's more important to you and whether it's worth it. Not just financially, but for your own sanity and well-being.