Is it possible to upgrade my jailbroken iPod Touch 2G to 4.0 (not 4.0.2) without losing data? I am currently considering update my second generation iPod Touch to the 4.0 firmware (not 4.0.2 because I need to jailbreak it). I know that if I update the firmware, I will lose the jailbreak. But is it possible to update it without losing music/videos/apps/etc?

All the instructions I found involve going into DFU mode, and afaik, you lose all your songs/data when you go into DFU mode. 

I have my SHSH on file with Cydia, so that is not a problem.
As far as I'm aware, if you make a full backup through iTunes, do the upgrade, and restore your data, you will retain the valid apps' data only.