Eyes [obj-を] close [or-か] not-close [while-うちに] I [topic-は] fell-asleep [regret-てしまった].
~か~ないうちに is a vivid pattern meaning 'barely had X happened when Y' — the verb appears in both affirmative (閉じる) and negative (閉じない) to emphasize the near-instantaneous transition. ~てしまった marks the involuntary or swift completion.