HTC M8 dies between 89-60. Please Help! How can I fix this?

I've had this phone since May of 2014 and just recently, about three weeks or so, my phone has been shutting off at weird percentages. It began at around 40% and when I would turn it back on it would be at around 17%. I was told by HTC support to reset the battery logic, which I did, and now the phone will die at around 89-70% and when I would turn the phone back on it would be at 17% or immediately shut off again. Sometimes plugging in the charger after it would shut down will show 35% and charge from there. This is all very wierd and has made my phone unreliable without my portable charger pack.

Since the battery logic reset did not work, you may want to backup your phone and perform a factory reset. If that does not resolve the issue, then your battery may be going bad, as this behaviour is sort of common with a cell that will not hold power and gives a false reading. Some local shops can perform battery replacements, but make sure they have experience with HTC devices because the M8 is a little harder to work on than the typical iPhone. The other option is to send it in to HTC for service, which would require you to use a temporary phone in the meantime.