give up the ghost idiom            
 死,死去
to die
  humorous(机器)报废,不能运转,完蛋 
If a machine gives up the ghost, it stops working.
  Our old TV had finally given up the ghost. 我们的老电视终于坏了。 
  UK放弃…;对…绝望 
to stop trying to do something because you know that you will not succeed
  All I'd cherished from early childhood had been denied me, so I simply gave up the ghost. 我自童年起珍惜的一切都被夺走了,我只好放弃。