The first thing you'll need to do is naturally panic. Get this out of your system. Do it now.
Okay, now that you're sufficiently running on adrenaline. Pull yourself together. You're better than this. You'll survive!
Before you do any recovery methods, you're going to want to ensure your SD card isn't faulty because something about that 20 GB halting looks off. You can brick the 3DS with a bad card, so lets avoid that from happening.
1) Take everything off from your SD card and put aside on your computer.
2) Reformat it as FAT32 + 32 KB with either Windows File Explorer or
guiformat if the card is bigger than 32 GB.
3) Next, run a Full + Write Verify test with
H2testw to ensure there are no hardware issues with it. (Card has to be empty when testing).
4) Use this cheat guide to get a bare bone CFW setup up and running. You want clean Luma3DS, boot9strap, and GodMode9. You can skip the steps there and go straight to dropping in those files in the archive.
5) Put your approximately 1.2 GB size
######_XX########_sysnand_000.bin NAND image somewhere, preferably in the
gm9/out directory.
6) Boot into GodMode9 by holding (Start) when turning on 3DS. Press (Home) button > Scripts... > Restore SysNAND (Safe)
7) Select your *.bin NAND image, punch in the combo key, and voila!
Oh, also make sure your AC charger is plugged in to be extra safe. *Cross fingers*