Official comment
You did the right thing in not closing rekordbox (well, multiple times).
Close rekordbox, open the following folder:
Win 7/8/10: C:\Users\yourusername\AppData\Roaming\Pioneer\rekordbox
OSX: /Users/yourusername/Library/Pioneer/rekordbox
You'll see a couple of datafile.backupX.edb files. Grab one of them from before this happened.
Rename datafile.edb to datafile.edb.old
Rename datafile.backupX.edb to datafile.edb (removing .backup)
Open rekordbox and you should find your songs and playlists all recovered.