What is the origin of the phrase "Given up the ghost"?
e.g. "After 10 years, my DVD player has finally given up the ghost."
Does it have a religious connotation?
Ghost can describe a person’s soul or spirit (if you believe in such things), so if you give it up, possibly to some higher authority, you no longer have it and you die. Its use in that sense is very old, but the expression is probably more used now to describe less dramatic events, as in your example.
It has a religious source:
And Jesus cried with a loud voice, and gave up the ghost. — Mark 15:37 (KJV) (BibleGateway)
However, it doesn't have a religious connotation in everyday use.
Initially, I thought it's a bad translation from German, because German does have this slightly colloquial way of expressing that something breaks.
However, according to Wiktionary, the phrase is from the King James version of the Bible, Mk 15,37.
There were Bible translations before the KJV, and this synonym for death appears in numerous places in Tyndale (1534). For example, Acts 5:5 reads: "When Ananias herde these wordes, he fell doune and gave vp the goost." Cf. Matthew 27:50: "Iesus cryed agayne with a lowde voyce and yelded vp the goost."
It appears in Euripides' The Medea, from 431 BCE, hence the origin predates the bible by nearly five centuries, at minimum.
http://biblehub.com/matthew/27-50.htm is a link that says when Jesus cried out in a loud voice he yeild the ghost