Has an aircraft carrier ever assisted a civilian passenger flight?
It has happened before.

There are definite cases of light civilian aircraft landing on a carrier, the most well known was in April 1975 when South Vietnamese Air Force Major Buang Lee landed an O-1 Bird Dog on the deck of the USS Midway trying to escape with his wife and 5 children from the fall of Saigon to North Vietnamese forces.

Landing aboard an aircraft carrier presents several difficulties, namely limited landing roll and available deck space.  A Nimitz Class carrier is just shy of 1100 feet in total length and 250 ft at its widest point.  The designated landing area or LA is approx 75 x 650 ft.  The ship is capable of steaming at 30+ kts so it can develop quite a bit of wind over the flight deck reducing the effective unarrested landing roll.

Then you need to stop the aircraft once it's on the deck.  Carrier based fixed wing jets use tailhooks designed to work with the arresting gear and reduce the landing roll to about 330 feet.

The largest carrier aircraft in service were the Douglas A-3 and the Grumman C-2 and E-2, each one about the size of a regional jet.  The largest aircraft which I am aware of which made a successful unarrested landing was a Lockheed C-130.

Large commercial aircraft like a Boeing 747 or an Airbus A-380 simply cannot fit on the deck without the wings clipping the island or other deck antennas, etc, not to mention requiring landing rolls of over 3000 ft even in the most extreme short field attempts.

So HAS a carrier aided a civilian passenger flight via recovery operations?  Yes but only with small aircraft.  COULD a carrier aid in recovering larger commercial aircraft?  Possible depending on the size of the aircraft, its loadout and fuel state and performance capabilities.