Sometimes if I have fixed a bug for so long, done tasks that would not be in my competency, or haven't complete my planned tasks for the day, I often end up working late in the night to feel productive for the day.
Do you have some measure that defines whether or not your day has been productive?