First thing: stop using the SD card completely. Don't record anything else to it.
If it was just a quick format, there's actually a pretty decent chance the videos are still there. Formatting usually just wipes the file table, not the actual video data right away.
I'd try recovery software before panicking:
PhotoRec (free, ugly UI but very good)
Recuva
R-Studio if you don't mind paying
For GoPro footage, PhotoRec is usually my first try.
One important thing:
Recover the files to your PC, NOT back onto the SD card. Writing new data to the card can overwrite the videos you're trying to save.
Also, if your SD adapter has a little lock switch, flip that on before connecting it again. Just helps avoid accidental writes.
Don't expect everything to come back perfectly. Sometimes recovered GoPro videos are corrupted or missing filenames/timestamps. But if no new footage was recorded after the format, your odds are honestly pretty good.
I've seen people recover entire vacation videos after formatting the wrong card by mistake, so you're definitely not the first person this has happened to.