So I have an embarrassing story and hopefully others here have some helpful insights. I am a fairly new diver with 70 some dives. I recently was taking my rescue class. We were in a local quarry I’ve dove many times. It was my turn to play the out of air diver. So as the other rescue student swims up to me I toss my reg and signal out of air. The other student fumbled enough getting his secondary and by the time he’s got it half way to my face, my mind is screaming I’m actually out of air(completely forgetting the nearly full tank strapped to my back). I grabbed his secondary and pushed the purge and sipped the bubbles enough to calm my brain. I’ve dove since then, but obviously don’t have out of air situations.
All that to say/ask this. When I look back, I’m frustrated with myself for fixating on the air the student was trying to hand me, forgetting the TWO sources of air I had myself. Moving forward, does anyone have suggestions to avoid the tunnel vision I seemed to have?
TL;DR: have a backup plan.
Nothing to be embarrassed about and thanks for sharing this. A couple of points, and I'll answer your question too
The first is that this is why we teach you to keep your reg in your mouth until you've got a better one. If you are actually OOG at 90 feet, as you ascend, you'll find you have some breathable gas as you ascend.
Second, don't run out of gas
But really, it sounds like what you had was a single plan in mind. If I may put on my mind reader's cap for a moment, the plan was something like this:
Instructor: "
@Mercracing on this dive, I want you to swim up to your buddy and signal out of gas. Make sure to open your eyes wide and look panicked."
(maybe he even suggested tossing your reg from your mouth)
@Mercracing: "Ok."
So, now you have a plan - "I'll drop my reg, signal OOG and (s)he'll donate to me." The problem is, you didn't have a plan for things to go in a way you don't expect. Dive professionals are used to things going awry when they ask students to do things.
I signaled out of gas to a student recently and the student mistook what I said and started to do a CESA, as an example. Sometimes instructors forget that students aren't as prepared to handle scenarios so they don't brief you to think about alternatives. I know I've been guilty of this myself.
If your instructor had added, "Stay in front of him as long as you're comfortable, but keep your second stage in your hand so you can switch back to it if something doesn't go right." (even better would be to add that you need to be relaxed, take a couple of breaths, and to ensure that you are neutrally buoyant before you start) to your instructions, I'd bet this would not have happened in the first place.
All that said, the short answer to your question about avoiding tunnel vision is an excellent perception of a major problem that divers have. Most instructors I know call state task overloading, or task fixation. It is a very easy state to get into when you're diving. If you've ever dived with photographers on a reef, you've seen it - the group swims away while the lone photographer gets left behind, so fixated on the shot that they've lost their situational awareness.
It's good to have bad things happen during training. I was working with a student recently who was doing a valve drill (closing his left valve on doubles) when he lost buoyancy control. He went up and I was patiently waiting for him to come back down. Since he'd closed his left valve on the way up (task fixated on closing the valve), he lost the ability to use his low pressure inflator.
As he passed me going down, I could tell he was having a problem and I followed him down as he bounced off the bottom of the lake. He hit his lpi several times and when that didn't work, he started working though the problem, eventually realizing that his left valve was closed. We had a really good debrief after that dive talking about what he could have done differently in a similar scenario. He could have orally inflated, or used his dry suit for buoyancy. He should have signaled a problem as he worked the problem, and signaled for attention while working the valves, as well as a couple of other things. . . Point being, he, like you, learned something far more important than the task that was being trained and that's often the true value of taking courses.