I have been known to concentrate on a task to the point where I forget to eat or drink. Time just evaporates. But I am not in the zone, really. I am drained and exhausted when I come up for air.
So, I adopted Pomodoro technique - you work on a project for 25 min (or whatever works for you) and then take a break. I have FocusTime app on my phone and it buzzes when my time is up. I get up, get some water or coffee, stretch, and I am ready for the next chunk. You can use any kind of timer. The point is to bring you back to reality.
I also try to alternate my "thinking" tasks with "mindless" tasks. This way my brain is still available to me at the end of the day.