When you don't have the emotional attention to put complete thought into a decision, whatever you do in the time until you regain full use of your emotional faculties is referred to as being done "in a moment of panic."

Although, it would be much bettter to consider a moment of panic as a species, a certain kind of animal in the taxonomy of events. Would be closely related to others its genus: epiphany; a moment of drunken clarity; an exclaim of delight; communication with god; a moment of weakness. I think that weakness is my favourite: pleasure is a fine substitue for joy in the early hours of the morning. Especially if its cold outside.