Safe Mode puts your phone in a diagnostic state (returned to default settings) so you can determine if a third-party app is causing your device to freeze, reset or run slow.
An alternate method is available if the device can be powered on and is responsive.
With the device is powered off, press and hold the Powerbutton (located on the top-left edge) until the HTC logo appears then release.
Once the HTC logo appears, press and hold the Volume Down button (located on the right edge).
Continue to hold the Volume Down button until "Safe mode" appears in the lower left of the unlock/home screen then release.
Allow approximately 1 minute for the process to complete.
With Safe Mode enabled, test device and app functionality. If the previous issue fails to occur, the cause has been isolated to a third-party app and all recently installed or updated apps should be uninstalled.
Power cycle the device to disable Safe Mode then reinstall and test each app one at a time to identify which app is causing the problem.