We have all been there. We do something we didn't want to do and our frustrated response to ourselves is "what was I thinking?". The answer is one of two things ... we weren't thinking at all or we were thinking about the wrong things and became distracted. Either are preventable.
Lord, help me to be intentional about what I am thinking about and when in doubt, help me to think about You.