How can I transfer my iPhone’s contents to an empty iTunes library? Last night, my hard drive crashed and it is dead. I don’t have any single iTunes backup – I use my iPhone to sync apps music, photos, etc. 

When I plug my iPhone in this new formatted PC, will it delete all content on my iPhone? How can I resolve this?

What should I do so that it will not delete all files in my iPhone when it syncs?

Also, is there a way to transfer my iPhone content to the new iTunes library?
Download DiskAid (free trial). You can transfer all your music and apps over to iTunes from your iPhone. It’s pretty straightforward so I think you don’t need instructions for that.
Connect your iPhone to the PC. The content won’t be deleted right away, it will be deleted only if you choose to.
Right click on your phone in the left pane in iTunes. Click Backup.
Make sure you have transferred all your content by checking the Music, Apps, etc. libraries on iTunes.
Reset the phone by going into Settings > General > Reset > Erase all Content and Settings. Make sure you have backed up before doing this.
After the reset, choose to restore from an iTunes backup in the setup screen.
The phone will restore first your settings, then your music and apps.
It is a time-taking and painful process, but eventually things will be restored.