Sure, but you would have to recapture that depreciation when you sold it and pay tax on any appreciation. A home is one of the few places you can make so much money tax-free. There are millions of people in California who have a $300K or more gain in their personal residence and it will all be tax-free when they decide to realize it. That's about like making $450K taxable income.
Also, you can defer the payment of these capital gains indefinitely on rental properties as long as you roll the gain into something else.
One big advantage of renting that is hard to put a value on is the renter's ability to pack up and leave on short notice if the neighborhood goes into the sh!tter.