If you still have access to the dialer please type the following code: *#7370# and then input 12345 as a security password. You will be asked if you want to reset the phone to its original state. All you need to do is confirm the operation and let phone restart and revert back to its original settings.
In case you don't have access, you will need to take the phone to your local phone service.