my suggestion would be to do the following..
copy your iTunes folder (the one that stores all of your music, movies, podcasts, etc), onto an external drive.
then, search Google for "iPhone backup location", and do not rest until you find out EXACTLY where iTunes keeps the iPhone backups. Then copy THOSE to the backup drive.
Then, MAKE SURE, you "de-authorize" iTunes. You need to do this, because a reformatted computer is treated as a "unique device" for your iTunes authorizations, and you are limited to 5 computer devices (iPod/iPad/iPhone are not counted as one of the 5 computer devices).
reformat, and after the system is back up and running AND fully updated, place all of the backed up data where it needs to go. Launch iTunes, go to the preferences and re-associate your old library with it, then re-authorize iTunes with the iTunes Store for playing back DRM content.
The iPhone and iTunes, at that point, should not even know that anything out of the ordinary happened, and will work the same as normal.