I don't think you're going to find a program, honestly... Assuming someone wanted to write a program like that, it is way too many keys and possible key combos to bind to just a few buttons on a gamepad..
Usually something like that has to be built into the OS from the ground up from what I can tell. It's one thing to have a controller scroll and select games in a MAME menu, it's another to have perform all sorts of functionality - not to mention that of a mouse. At the very least this would require some sort of custom drivers to, say, get the D-Pad to move like a mouse cursor