Dr. Oz's medical knowledge came in handy on his flight to Mexico this week ... 'cause the celebrity doc treated a fellow passenger during a health scare up in the air, TMZ has learned. Check out this footage, obtained by TMZ, that shows Oz vigilantly tending to another traveler, whom we're told was going in and out of consciousness an hour into Friday's flight from NYC to Cabo San Lucas. Dr. Oz has confirmed the medical incident, telling TMZ ... he was en route to a wedding when he heard flight attendants asking for medical help, and he answered the call. He adds ... "[A] middle-aged healthy man lost consciousness and we did usual triage with physical exam and vital signs. After oxygen, OJ and time, he recovered and needs to have a detailed evaluation with his local physician." Dr. Oz explains he had the passenger drink some juice since low blood sugar is a cause of unexpected syncope (fainting). He also noted that "oxygen is the best drug we ever use." According to the doc, the sick traveler is doing much better now ... but eyewitnesses tell us he actually gave the man his phone number in case another emergency occurred once they landed. BTW ... This isn't the first time Dr. Oz has jumped to the aid of a stricken traveler. As we reported ... Oz demonstrated some lifesaving heroics at the Newark airport in 2021 -- using a defibrillator on a collapsed man. Dr. Oz told TMZ at the time ... he rushed to action after a 60-year-old man collapsed with no pulse and a horrible color. He was able to revive the man from the brink of death ... who was then taken to the hospital. Dude's a real-life hero ... and he's true to his craft!