I'm in the midst of battle, exhausted and burning up in the summer sun in my armor. Surprisingly, as a human I'm going to need water sooner or later or I'm done fighting. Was there a way to keep the troops hydrated, say, as a roman or a greek etc.?
This is in fact a good question that serves to illustrate actual fighting not only in the ancient world but up to the 19th century and the coming of the industrialization.
In general, battles would not last days nor many hours in the ancient world. Armies may scout for each other for days or even see each other for a while but actual engagement and fighting would be a matter of few hours. First, fighting was a matter of daylight, typically starting at the early morning, if you start an engagement after let's say 3 o'clock (a keep in mind there were no watches back then but position of the sun) you risk reaching sunset with no clear outcome and darkness would bring the cease of fighting or otherwise you risk chaos with no visibility and lack of control over your troops (directing troops in ancient times was already extremely difficult once battle began, no radios, no comms but may be some runners and perhaps drums and horns, but they would be very difficult to hear in the midst of battle). Still in the American Civil War (1861-65) troops would call it off at sunset and man the lines until the next day and see if fighting was to be resumed. Because all this it's common to read accounts of men having their breakfasts before battle begins. So basically you had to gather your strength for the next few hours and resist, you would resupply once the engagement was over if you were lucky and not left wounded on the field or captured.
Once an army broke and fled, a classic scenario, the victorious troops would engage in pursuit if possible since more often than not many would overrun the enemy camp and stop for lotting.
On to your original question you will see in any ancient maps that many battlefields were next or near a river (Cannae and Kadesh for instance) or access to water of some kind, an oasis, lake, stream, wells etc. Not only men but their wagon trains, oxen, cows, horses, etc need significant quantities of water. Your initial assumption about exhaustion is in fact right, the one who endures more can in fact win the day. Fighting is brutal and exhausting, wearing the armour, the physical demand of pushing, hitting, defending etc is huge. I like to compare it to mouth to mouth resuscitation, if you ever tried the effort will break you in less than 10 mins, now think about carrying a helmet, a shield, a large and heavy sword, or axe or spear (probably little armour if you were not a Roman soldier or a Greek hoplite) but wrapped in leather, shoulder to shoulder, pressed and pushed by the ranks behind you and once it comes to hand to hand the constant blows, hits, your brain ordering vast amounts of dopamine produced and there you go, it cannot go on for more than between 1 and may be 4 hours. The experience must have been terrifying.
Some references to give you an idea:
Battles of the Ancient World 1285 BC - AD 451: From Kadesh to Catalaunian Field
Ghosts of Cannae
War in the Middle Ages
The Cambridge History of Warfare