When working with coworkers, you often have to stay positive and "on" all the time. This can be draining, especially when you see the same people multiple days in a row. Sometimes, when working with someone for 4+ hours, I get the daunting feeling that I am irritating them (perhaps a projection of me feeling irritated) when I'm no longer at my mental peak. I can ramble when I'm tired and forced to talk. What are some pro-social ways of stowing yourself away to recharge?
Working closely together for 4+ hours would hit most people's limits of productivity.
So, honestly, it is perfectly okay to say that "you need to take a break". You could also mention that you need to get something done before the end of the day or such, even if that "something" is sitting quietly by yourself, or whatever you need to recharge. If there is work still remaining to be done, then for bonus points, try to split some of it in a way that can be completed independently, and then suggest an appropriate later time to "regroup".
Lastly, I get that you may feel like you need to be 'ON' when working with your team mates, but you don't necessarily need to be positive all the time, especially with folks that you work with.