When we meet Elijah Wood's Ryan on this season premiere, he's writing the third draft of his suicide note. He then blends pills into a shake and tries to finish the job... but it doesn't take.
We later learn the reason why: Ryan's sister, a doctor, only gave him sugar pills because she can't prescribe meds to family.
But Ryan doesn't find this out until the end of the episode, and in the meantime he starts to see how (hot!) neighbor's dog as a person, an Australian man named Wilfred. The two go out on some adventures, with Ryan mostly depressed and Wilfred trying to coax him out of it. He wants Ryan to act like a man; ironically, he accomplishes this by teaching him to act like a dog.
The moment of Ryan's true change occurs when Wilfred convinces him to take a crap in his rival's shoe. Ryan does so and immediately feels more powerful. He goes home and tells off the boss at his new job and seemingly has no interest in killing himself any longer.
He has no clue why he sees Wilfred as a human being, but the nervous breakdown appears to be doing wonders for his confidence and his outlook on life.