Hi,
Be sure to unplug everything from the PC except the keyboard, mouse and monitor.
If the PC still loops in attempting repairs then you will need a Widows bootable DVD or flash drive. Boot this media up and click on --> Repair your computer --> Troubleshoot --> Advanced options --> Automatic repair and then select the operating system to repair.
If you can't obtain the Windows 8 bootable media then try the suggestions posted by HP for recovery problems.