I've been following this discussion over the past few days since I've had the same problem. After trying everything suggested I can confim the solution -
The issue is caused by "Zone Alarm" or possibly any other third party firewall or security that you might have installed on your computer. Before you restore your iPod/iPhone from recovery/DUF mode, disable Zone Alarm or any other firewall software you have on your computer. "Error 37" should then be resolved.
IMPORTANT - if during your first sync with ios4, the ipod crashes/dies/shutsdown again, then repeat the process, but make sure that your security software is disabled. Until the next iTunes update, there may still be a few problems with third party security and firewall softwares, so it might be best to temporarily disable them when using iTunes to save you having to go through this process again.
For those with other questions -
Yes, everything on your iPod will be erased, but your settings etc. can be re-synced by reconnecting it to your itunes and syncing as per usual. Specific settings such as homescreen backgrounds, wifi settings etc. will only be restored if you have made backups of the iPod on the computer you are syncing from. iTunes will automatically propmt you to reinstall these settings when it recognises your iPod.
Instuctions to put your iPod into recovery/DUF mode can be found on this discussion board or by searching on apple's website or even through tutorial videos on youtube.
Ironically, technicians in the Apple retail stores had no idea what the problem was and did not know how to solve it - they were too busy trying to sell the HUGE new iPhone. oops, I mean iPad.