Just imagine this as the next scene in the morgue (after 'this is your arm and this is mine). Like two corpses that by some reason lost their body parts and now are trying to find them...
We definitely don't say this in America. We would say "What was I thinking!"
We do say this in America where I am from.
To stop the confusion:
Yes, this is an idiom that means "What was I thinking?!"
But also yes, it can literally mean "Where was my head?" xD
(for the ones with a good imagination)
"голова" is used here in the meaning "thinking, reasoning", but not a body part. As a native Ukrainian speaker I think that "Where was my head?" is not actually correct translation
Where's your head at?!
Why not "where my head was!"?