Mendonca was born in London but moved to Wearside as a toddler, and put the Addicks in front at Wembley before also drawing them level at 2-2.
Niall Quinn quickly restored Sunderland's lead but with five minutes of normal time left, Richard Rufus headed home to take an extraordinary match into extra-time.
The north-east side took the lead for the third time through Nicky Summerbee in the 99th minute, but Mendonca helped the Londoners hit back again and made it 4-4 just before half-time of the additional period.
The match went to penalties, and each side successfully converted their first six spot-kicks, with Mendonca setting the tone by scoring the very first one.
Shaun Newton netted Charlton's seventh, before full-back Michael Gray stepped up to reply for Sunderland in sudden death.
His tame effort was saved by Charlton goalkeeper Sasa Ilic, to seal the club's place in the top flight.
Mendonca followed up his heroics by also netting a hat-trick in Charlton's first home game of the new 1998-99 Premier League season, a 5-0 win over Southampton.