I have both: M8 for personal use and a S5 from work.
Now, keep in mind I use the M8 about 100x (no exaggeration) more than I use my S5. I have an average of about 3-4 days battery life on my S5 due to my screen-on time being about 3-5 minutes per day (only for checking email or an occasional text from a co-worker). That said, here's some things I can say from my time spent with them:
S5:
The camera has been good the 20 or so times I've had to use it (mostly to just take information quickly from a computer screen or something similar). The user interface, TouchWiz, feels cartoonish to me. It would seem more appropriate for a child's toy than a professional phone, to be honest. Aside from the TouchWiz, though, it's a generic Android feel. The stock email app is nice, but the texting app is another part of TouchWiz - if you go with the S5, I recommend getting a different app for messaging, such as Hello or Textra. The battery life is very good, though my limited usage of the device certainly contributes.
M8:
This is a great device. The camera is not nearly as bad as some reviewers insist it is. I've never had any kind of issues with the camera personally. On top of that, I've found that even given my moderate to high use of the phone, the battery life is excellent. I have a long day - I leave the house at 7:30am and come home some time between 10 and 10:30pm. I never come home with less than 50% battery life. I use the auto-brightness, wifi all day, bluetooth streaming for about an hour every day to my car and I use Facebook, hello (messaging app) and a few games. I love this phone. There have been a few times where I've been away from home and had no charger. The Extreme Power Saving mode uses only ~4% over ~8 hours, which means I don't have to rush and find a charger the next day. The build is beautiful and while I have it primarily in the Spigen Slim Armor case, I take it out once in a while and clean the screen and the camera lenses and admire the phone. The reception has always been good, even in my area where reception on other carriers has historically been terrible - 1 or 0 bars is the norm (VZW being the only carrier who has a good quality signal - 3 or 4 bars is the norm). My wifi and bluetooth are left on 24/7, as is my location service. I've had good experience with the GPS on the phone, and navigation has always been accurate.
Overall, the main thing that bothers me about the GS5 is the TouchWiz interface. It's terrible. It looks terrible. It's not intuitive and quite honestly looks ridiculous. The M8 has no such issues - Sense is a slight variant from stock Android, but it makes things easier, not harder, and it doesn't look ridiculous. I don't particularly like BlinkFeed, so I disabled that, but overall the phone is a joy a to use, and I'm sure that when the time comes I'll be upgrading to the M10.