Read this user supplied hint. https://discussions.apple.com/docs/DOC-3141
You should have had a backup of the computer so you could have copied your iTunes library. You are correct in your assumption that the iPhone believes this is a new library because nothing is there. And it really isn't the same since you have reformatted your drive/computer. This hint should help you out.