You can restore the original factory settings, but be careful, since this reset removes all data you have saved in the phone memory and all your personalization.
If you are disposing your phone, note that you are responsible of removing all private content.
To reset your phone to its original settings and to remove all your data, on the home screen, type in *#7370#. If asked, enter your security code.