Sunrise....you might try going into a Tmobile shop and asking for help from them, starting with getting them to waive the early termination fee. If you lucky they may do it since it was a gift that you are now stuck with.
Then...here is a link on resetting the Galaxy plus to its factory defaults that will erase all the data stored in the phone along with any apps that were bought for it.
Note that this does NOT erase data stored on the microSD card which slips into the side of the phone. You will want to remove that card. If you know someone else with a smartphone you might see if they want that card. With an adapter you can plug it into your computer and erase it like a thumb drive or hard disk before you give it away or sell it.
The store should also help you when you approach them about waiving the cancellation fee.
You can certainly sell the phone. Perfectly legal.
Dave
Here is the link.
http://www.knowyourcell.com/samsung/samsunggalaxys/galaxy-s-guides/498616/how_to_hard_reset_the_samsung_galaxy_s.html