There's many different answers, it depends on what you mean by "last".
If you are talking shutter life, that depends.
The most common thing to go wrong is the shutter.
A shutter can die at any time - 200 actuations or 200,000 actuations or maybe more and anywhere in between.
It also depends on how much you use it. If you don't use it very much and only take say 5000 shots a year, then it might be 20 years or more (based on 100,000 mean actuations) before the shutter goes so your camera will last 20 years. If you do 50000 frames a year, it might only be two to three years before you are looking at a new shutter.
Most people upgrade their camera simply because they want the latest and greatest, not because their is something wrong with their camera body.
Lenses, if they are looked after will last for many years.
The oldest lens I have is a non IS 300/2.8 made in 1999. (this give me an idea for a thread)
I know someone who regularly uses a 40 year old manual focus lens on his Pentax.
I would suggest that there are people on this forum who also use lenses of similar vintage.
There are too many other variables to this answer which I'll leave to others to mention.
As for your other question, about depreciation...a good rule of thumb is that a body will lose about 1/3 of its value for each year, and even more when a new model is released.
This is only a guide and will depend on the model.
As an example, I bought my 10D (body only) brand new in August 2004 for Au$3000. In September '04, Canon released the 20D. It instantly devalued my brand new camera by about $1000.
Today a 10D in excellent condition (if you can find one) will bring about Au$350 on a good day with a tail wind.