Word, expression or idiom for looking at nothing in particular
Solution 1:
to look/stare into space is close to your description:
to look in front of you for a long time without seeing the things that are there because you are thinking about something else:
- He sat quietly for a while, staring into space.
MacMillan Dictionary
Solution 2:
How about zone out?
M-W:
zone out: to become oblivious to one's surroundings especially in order to relax
It's applicability extends beyond relaxing. One gets lost in one's own thoughts in many other contexts, during a conversation or at a meeting.
Solution 3:
You could also use the thousand-yard stare
a vacant or unfocused gaze into the distance, seen as characteristic of a war-weary or traumatized soldier