accidentally deleted entire iTunes Match music library - is there a way to recover? I'm slightly panicking here.

I don't keep local copies of songs in my iTunes library, instead streaming them on demand via iTunes Match, to save space on the SSD drive.

In certain situations such as buying music from a source different than iTunes, or if i decide to download an album for listening locally, the songs end up on my disc. So whenever i feel like it, i select all the music in the library and hit delete in order to delete the local files. My music is still stored on Apple's servers.

Today though, in a hurry, i must have hit the wrong button which, in a blink, deleted my entire library from iTunes Match. It disappeared from my iOS devices and from iTunes on my Mac without a trace. Gone. Help! is there a way to undo this step?

I should add, ~99% of my collection is not bought through iTunes, so it's not a matter of re-downloading previous purchases.

update: okay, shortly before this incident, i was adding an album to iTunes in ALAC format which i had reencoded from FLACs bought from boomkat.com - this was "exotic" music not available from iTunes, and the Match status said "uploaded" from all tracks. Now, when i added these same files again to my freshly wiped library, it didn't upload them. Sure enough, the status says "uploaded", but the process took like 2 seconds. The files were definitely cached on Apple's server, so I still have a little hope..
Unfortunately, iTunes Match really isn't made to be a backup service in this way, and it can be really easy to loose stuff if you don't have other means of recovering it.

For those songs you purchased from iTunes, you should be able to still see them in the purchased list in the iTunes store, and re-add them to your library. Many other sources, like Amazon, will also allow you to re-download their files.

If you had a Time Machine backup, maybe your old library is stored there as well?

If you happen to have an iPod, and had any music synced to it, you could actually use that as a 'backup' and pull your songs from there using an application like iRip. This would only work though if you had a device with the files actually on there, as in a iPod classic or nano, or an iOS device you had downloaded music too.

Finally, you MAY be able to contact Apple Support and see if they have any way of helping, but this may take a very long time and not actually produce anything. I have had a hard time getting support on anything with Match, so replacing an entire library may even be harder. I would recommend calling them if possible.