Ja-Cheol Koo's first-half strike looked like it would be enough to take the 05ers through on away goals until Pablo Mazza grabbed the home side's third of the night with four minutes left to play.
Leading 1-0 on aggregate thanks to Shinji Okazaki's first-leg effort, Mainz's nerves got the better of them away from the comforts of the Coface Arena with Asteras' Pablo de Blasis levelling the tie from range in the 30th minute.
The visitors' play had been somewhat pedestrian, but a flash of brilliance from Yunus Malli and a cute finish from Koo ensured Mainz went in at the break level on the night and with an away goal to boot. The Greeks duly applied the pressure after the restart and, moments after being foiled by a combination of Loris Karius and the post, Mazza fired his side back in front.
Okazaki struck the upright in response, but it was the hosts who carried the greater threat and their persistence paid off when Mazza pounced on substitute Papa Khalifa Sankare's flick and slid the ball beyond Karius to send Kasper Hjulmand's side crashing out 3-2 on aggregate.