You just need to know that the Z speed is negative, as I assume you’ll want the falling animation to activate when walking off the edge of something during walking as well as out of a jump. Of course, you may want to restrict it somewhat with a property to know if the animation should be modified somehow (shooting and falling, falling against a wall in the case of Megaman).
cont = bge.logic.getCurrentController()
megaman = cont.owner
#Use these lines if the object to animate isn't the physics object
#scene = bge.logic.getCurrentScene()
#megamanSprite = scene.objects['MegamanSprite']
if megaman.linearVelocity < 0 and megaman['onlyfalling']: #onlyfalling refers to the property
animationChangingFunctionOfYourChoosing() # You could write a function to pass megaman or megaman.Sprite to, or just write the animation code right here.
I don’t know exactly what you’re using within Blender to animate the sprites so I’d leave that up to you. Just load the above as a Python script with an Always actuator with True pulse and you should be good to go (although I’m sure there’s a more efficient way to set it up).
UPDATE: In addition, some motion actuators can add negative velocity even when you’ve landed and you probably don’t want the appearance of falling if you’re merely walking along an uneven surface. In that case you’d want to tweak the value somewhat (-0.1, maybe even -0.01).