What in God's name have we done?
It seems 'in God's name' = 'on earth'.
Without more context, it's probably figurative and used for emphasis. And yes, you could say that both "on earth" and "in God's name" can be used as intensifiers in this sentence, but I think "on earth" implies more incredulity while "in God's name" is more like regret.
It seems there is a slight difference, but I'm not sure if I've defined it well.
That is merely one kind of ejaculation:
It acts as an intensifier for the sentence.
You can see that
are considerably more excited, if not stronger, than