Heartbreak does not represent the absence of God and he also hurts when we hurt. His arms are ready to save us when our spirits have been crushed by disappointments. God cannot be tempted of evil and it is the presence of sin in the world that leads to heartbreak and hurt. Sometimes God will allow hurt but he stays close to us to guard our hearts and strengthen our spirits.
Jesus also experienced the most severe forms of rejection from his own people which led to his cruel death on the cross. He understood grief and in the garden of Gethsemane leading to his death he experienced anguish and pain. Isaiah prophesied of Jesus that He is despised and rejected by men, A Man of sorrows and acquainted with grief. And we hid, as it were, our faces from Him; He was despised, and we did not esteem Him. (Isaiah 53:3)
Jesus is no stranger to sorrow and yes he was despised. Imagine Pilate offering to release Barabbas who was a hardened criminal instead of Jesus and the people chose Barabbas. Why would people so despise Jesus who went around doing good such as healing the sick and cleansing the leaper yet embrace a hardened criminal?
This is why Jesus came to take our sorrow, shame, guilt, rejection and insecurities to the cross with him. He knows exactly how we feel when we hurt and he is no stranger to emotional pain. Surely He has borne our griefs; And carried our sorrows; (Isaiah 53:4) All of these emotions have been nailed to the cross of Jesus and in exchange he offers us an abundant life with him.
Trust God to be close to you when you are hurting and know that he understands every kind of hurt. God is close to you and he cares when we hurt.