First, follow the unbrick guide (maybe not needed? IDK, included it because I am not sure how thorough factory reset is). Then turn off the phone, hold the volume down and power buttons, and wait for the phone to vibrate. When it vibrates, let go of the buttons and quickly slide your fingers across you keys, from the back button to the menu button, until it starts the factory reset. If the phone boots normally, turn it off and try again, this can take multiple attempts.