At the point where we give up, Jesus is always there. The question would be if someone is giving up on God whom is he or she surrendering to? The answer is very simple and clear, to satan and there's no debate about that. I 've been going through a trying moment of recent and at a point where I felt like letting go, God answered my prayer. The trick is not to give up but staying in the presence of God and having the faith that he is able to deliver you out of it.
Psalms 94:18 says, When I said my foot is slipping ,your love o lord supported me. Let's learn to be still and know that he is God.(Psalms 46:10)