Assuming you're right handed (if left handed reverse the procedure)
Take a moderate, not hard, grip with your right hand. Making sure you grip does not interfere with the trigger finger. If your grip is hard, you can move your trigger finger without disturbing sight alignment.
Now use your left had to get a firm grip over the right.
In other words, relaxed shooting hand, hard grip with the support hand.
Tons of dry firing and practice will allow you to shoot your 40 just as well as your 9 mm in the same gun.
This will also improve your 9mm shooting.
CPT USAR Ret
USAMU Sniper School Oct '78
Distinguished Rifle Badge 1071