EDIT/UPDATE: As this is a pretty old post you might not get it to work this way. There are plenty of comments which help most people fix the problem. I've removed the dead link to avoid confusion but most of what you need to get it to work is still there.
After goggling and checking this forum repeatedly for a gamepad fix. The only thing that worked for me was using part of this guide[www.theprohack.com]
. Only follow the following steps (refer to the guide if you need pictures)
Install Xpadder from this link[majorgeeks.com]
. (Run in vista SP2 compatability mode).
Click on the controller icon to create a new profile and walk through the tabs and enable all buttons on your gamepad.
Go to the finish tab and click close.
And instead of only mapping wasd like the guide tells you to. Just bind all keys to your gamepad like (there used to be a link here which is now dead).Don't forget to save your profile!
When launching the game keep your gamepad disconnected, otherwise it'll detect your gamepad. Once you've launched the game connect the pad and you'll be able to play.
If you want to change any keys you should be able to do it in the game itself from then on.