Technically it probably does relate to the energy before and after a collision, but you can fake it since in the physics engine it'll probably always be proportional to the momentum at the point of the collision. Momentum is speed * mass so you only really need something based off that, I think.
However, you probably want the relative speed for calculating damage. If you're going at 1000 px/sec to the right, and you collide with something going right at 900 px/sec, that's a 100 px/sec collision speed, not 1000 px/sec collision speed (factor of 10 difference!).
The result formula for A colliding with B (pseudocode) probably looks something like
0.1 * distance(0, 0, A.XVelocity - B.XVelocity, A.YVelocity - B.YVelocity) * A.Mass
where 0.1 is your 'fudge factor' (since a damage value just involving speed and mass is probably a really big number)