Welcome to the HP Support forum. Thank you for your post.
If your PC originally came with Windows 8 preinstalled, it should have a recover partition locally stored on the hard disk drive. Every HP computer comes with recovery partition present to assist in tough moments. You can read these guides and boot the PC from the rec partition to reset the PC to factory default condition :
Hope this helps. Let me know how it goes, provide feedback and update.
>> Your FEEDBACK is important. Click below on Accept As Solution or ThumbUp+ buttons if my comments helped or to say thanks << *** I work for HP *** I express personal opinion only *** HP Expert - Volunteer since 2013