If the display is off, press the POWER button to turn it back on. If you've set up a lock screen, you need to unlock it.
Press and hold the POWER button, and then tap Restart.
When asked to confirm, tap Restart.
Uite ce zice site-ul oficial, man: http://www.htc.com/us/support/htc-one-m8/howto/465049.html. Si uite ce ar putea zice Google: http://lmgtfy.com/? q=+HTC+one+m8+hard+reset. :P