Ok, here's the steps you need to take to get back to stock working phone.
Reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open a command prompt window in the adb/fastboot folder on your PC - if in Explorer hold shift + right click, and pick "Open command window here" from context menu.
Then type:
fastboot devices (to check fastboot connects to phone ok, it should also return the phone serial number - write this down carefully as we will need it later)
Next steps to get you up and running:
1) On PC download the TWRP backup files you need from here:
http://forum.xda-developers.com/showpost.php?p=60211235&postcount=2
scroll down to CID HTC__038 section and pick the download link for 4.18.720.10.
Plus the stock recovery, which is handy to have if you want to fully return to stock, from here:
http://forum.xda-developers.com/showpost.php?p=60211779&postcount=4
in the section headed 4.xx.xxx.xx scroll down and again pick the 4.18.720.10 download link.
2) Next, do you have a micro sd card in the phone? So you can copy the TWRP backup files you downloaded to the micro sd card and access them in TWRP. The main point to note is that you need to place the extracted files from the zip or rar file in a folder, on micro sd card, with the following name:
TWRP\BACKUPS\
<your phone serial number>\
<backup folder name>
Where:
The phone's serial number is what you noted down - the
<your phone serial number> folder you create needs to match this exactly.
For
<backup folder name> give it a name you'll recognise eg Stock_Backup - this can be can be whatever you like, I tend to avoid using spaces just in case.
The key point is to make sure you have placed the extracted backup files in the above folder, so once we get the later version of TWRP flashed (see below), it will pick up the files for the restore. When you extract the zip/.rar file I suspect you'll find a folder extracted with a name that ends in "... release-keys" it is the files in this folder that you need. You can just use this folder if you like, but as this will appear in TWRP as the backup name I think something called "Stock_Backup" is easier to recognise and deal with.
If you do this before the next steps, it'll save a bit of time.
3) Then download the latest version of TWRP recovery from here, and save to folder on PC where you have the fastboot.exe:
https://dl.twrp.me/m8/
I'd go for the 2.8.7.0 version but latest should be fine if you want to try it. Check the md5sum for your downloaded file matches - the md5sum link is at the top of the website download page, and the mini sdk zip file includes a md5sum checker in it if you haven't got one.
If md5 checks out, reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open a command prompt window in the adb/fastboot folder on your PC - if in Explorer hold shift + right click, and pick "Open command window here" from context menu.
Then type:
fastboot devices (to check fastboot connects to phone ok, it should return the phone serial number)
If it does, then type:
fastboot flash recovery twrp-2.8.7.0-m8.img (assuming you downloaded this version of TWRP)
4) Then we need to check you can get in to TWRP ok, on phone bootloader screen use vol down to highlight HBOOT from the menu and press power button to select. Wait until HBOOT finishes check (some green text appearing on screen), then select RECOVERY from menu using vol down and pressing power to select.
This should load TWRP. Then you want to do the restore of the backup you downloaded, so select Restore to get into the restore screen. Now you need to point TWRP to your external SD card, look for the line of text in restore screen that will say something like Internal Storage, press on it and then select External SD Card (or might be Micro sd card, can't recall off the top of my head) - it should be obvious which to select. You should then see the backup listed.
Press on backup name, you should then see a screen with various partitions to restore selected (ticked), there should at least be Boot, System and Data. Then at the bottom swipe the slider left to right to start the restore.
At this point, once restore has completed successfully, I would reboot phone and check it boots ok and complete initial set-up before moving on to the stock recovery step. If it boots ok, you might have to reboot back in to TWRP and do a data only wipe if there are any artifacts hanging around from the backup you have just restored. Let me know if that's the case.
The following is Optional if you don't want to keep TWRP, and get back to stock - I wouldn't until we're sure phone is working ok
5) On PC, copy the stock recovery image you downloaded to your fastboot folder, reboot phone to bootloader and plug in to PC (so you see FASTBOOT USB on bootloader screen). Open a command prompt window in the adb/fastboot folder on your PC - if in Explorer hold shift + right click, and pick "Open command window here" from context menu.
Then type:
fastboot devices (again just to check fastboot connects to phone ok, it should return phone serial number)
If it does, then type:
fastboot flash recovery recovery_4.18.720.10.img (I haven't downloaded this so the "recovery_4.18.720.10.img" filename might be different, just type this with the correct filename if it is)
This should be you back to 100% stock rom/kernel and recovery i.e. unrooted.
Optional if you want to go fully back to stock
6) Then if you want to, the last part is just a case of relocking the bootloader and the phone should be set for OTA updates. At this stage until we are sure everything is ok I wouldn't recommend doing this, in case we need to get TWRP back on. Command for this from PC is:
fastboot oem lock
Let us know how you get on.