I remember watching an anime between 2007 to 2014, that centered about a boy that was supposed to be some kind of artifact that could be quenched for a lot of energy, but should he survive till midnight, his body - no matter how badly beat up - got reset to being all fine and fresh and the energy contained within him refilled with a little extra sliver.
The other main character was a girl that acted as some kind of monster hunter or guardian for those that didn't know about the whole supernatural stuff. I believe she thought in Episode 1, that the male protagonist was going to die around midnight and spent the final moments with him.