Yes. Pretty sure that this has been proven too; I've done some research on it. For some people raising a pet can give them a sense of purpose and make them feel useful.
I'm serious my friend, I know someone who got più depressed with pets instead of getting better. Because some people don't want to see them die and that particular person I'm talking about doesn't even want to replace it with any other pet even after years. I guess with that person it's rare a case. Pets are life.