How to compare mAh and Wh
The Simple Answer
DC Power is defined in terms of W = 1 V * 1 A - that is, the power that is delivered by sustaining 1V potential with 1A of current.
Thus, a battery pack that can deliver 5400mAh, that is 5.4Ah, while sustaining voltage of 10.4V (this happens to be running in my laptop right now), can in theory deliver up to 5.4 * 10.4 = 56.16 Wh = 56160mWh.
The Complicated Answer
The above get a lot more complicated with different battery chemistries, and with different measurement methods. Firstly, the mAh rating can depend on the actual current draw - in general, the more current you draw, the less capacity the battery has, but there are exceptions at both ends of this guideline (if you draw too slowly, self discharge affects your measurement, and if you drive quickly enough, the battery gets warmer, and if it doesn't break, it tends to perform better).
Also, the voltage across the battery changes with the load - this is at least simple, the more current you draw, the lower the voltage across the terminals (this is due to internal resistance).
Finally, some devices are essentially dumb loads (battery powered tools), and draw as much as they can from the battery.. and some devices handle voltage and current changes in a more intelligent manner (mostly laptops and other DC/DC converters).
This means that for dumb loads, you are more concerned with mAh ratings (perhaps measured until battery voltage remains above some usable threshold).. since this can be used to calculate time-to-empty (which is really what you or your users are after), and dumb loads are approximately constant current/constant resistance loads.
For smart loads, the discharge controller (DC/DC converter) would actually try to drain constant power - the lower the voltage, the more current it drains so that it can continue outputting constant power on its business end.