I can manage to make it happen sometimes:
1)Go prone with a weapon out *and raised
3)As the zombie gets close attempt to stand and switch to a bigger melee weapon like an axe or baseball bat.
4)If the zombie hits you before you fully rise you'll end up prone again with little animation, or the sprinting-empty-handed dolphin dive. Then you should put the axe away and take the gun out and then put the gun away.