This reminds me of Fear and Trembling by Danish philosopher Soren Kierkegaard. In it he talks about the biblical myth of God testing Abraham, by asking to kill his son Isaac. It is a proof of faith.
Personally, I would trust that the message of the deity I follow, is one of love. And I would try to reconcile that to love. In fact when things are going rather rough I think of this.
It is indeed a good question and what that has long been analyzed in philosophy.