I was in the same boat as many of you around the release date of both phone and after a great deal of research I decided that although yes, the S5 edges it narrowly in terms of performance that there really isn't a lot in it which effectively made my decision easy - Aesthetics, and as previously mentioned the M8 wins every time.
My mrs has the S5 and after playing with both I can firmly say I'd be happy with either, features such as the finger scanner and HR monitor are nice gimmicks on the S5 but they are exactly that, Gimmicks.
The HTC feels far more quality, and seems to operate more smoothly for want of a better word however admittedly the volume button & lock screen buttons are far to easy to press often being activated in my pocket which is somewhat annoying.
All in all Id be contempt with either, you may as well throw them in the air and see which one you catch first!