Do you have the install media? If so just boot from it... Otherwise....
If you've got access to another PC, then it should be simple - source and download an ISO of Windows 8 and then Microsofts USB download tool.
Once you have the two, stick a 4gb+ USB stick onto your spare PC and use the tool to copy the ISO content to the USB stick and make it bootable.
Once done, you should be able to boot the laptop from the USB stick by holding down a function key during POST.
Just install to the now blank drive and put your licence key in when prompted.
You might need to download your network device drivers from HP on the second PC and put them on the USB stick to get the machine online (if Windows doesn't do that for you).
Then just download all the driver updates and patches to get the system up to date. HP might even provide a tool to install that will intelligently download the system updates you need.
Then when all done, make sure you shutdown properly and avoid corrupting it again.