The short answer is:
If you own Battlefield: Bad Company 2 on Steam (not the EA App version, though you can add it as a non-Steam game), is your best friend. Steam Input allows you to map every controller button, stick, trigger, and even gyro to keyboard and mouse inputs.
If you're planning to play Battlefield: Bad Company 2 on PC with a controller, make sure to: