*When I plugged in my iPod, everything automatically got erased on it*
If it is set to update automatically you would have received a warning that the iPod was linked to a different library and asking if you want to link to this one and replace all your songs etc, if you chose "Erase and Sync"
instead of "Cancel" iTunes would have removed all content from the iPod and with nothing to replace it would have left empty.
If you didn't make a back-up of your purchases to restore from then I'm sorry to say that the policy on lost purchases is that you have to pay to download them again:
"Once a Product is purchased and you receive the Product, it is your responsibility not to lose, destroy, or damage the Product, and Apple shall be without liability to you in the event of any loss, destruction, or damage."
iTunes Store: Purchased content can be downloaded only once
You could try contacting the iTunes Music Store Customer Service and you might be able to persuade them to sanction a second free download. There have been occasional reports in the iTunes forum of this happening, however just be aware that they are not under any obligation to do so. If you click on any of the links on this page you'll find a space at the bottom to email your query:
iTMS Customer Service
You might also want to check out this page for future reference:
How to back up your media in iTunes