If an Old One takes damage while attacking my farm, do I get credit for it?
Yes you get the credit for killing the Old One exactly as if you had attacked it.

This was verified by Martin Wallace the game designer in this thread on BGG.