"... the Son can do nothing by himself ..." (John 5:19)

For this reason they tried all the more to kill him; not only was he breaking the Sabbath, but he was even calling God his own Father, making himself equal with God. Jesus gave them this answer: "Very truly I tell you, the son can do nothing by himself; he can do only what he sees his father doing, because whatever the father does the son also does." (John 5:18-19) 

Is Jesus saying this literally or as a metaphor?

Many have misinterpreted this literally, with the "son" being Jesus and the "father" being God. For this reason, many translations have added capitalization to "father" and "son."

Rather, Jesus is using the relationship between a father and his son metaphorically to explain the relationship he has with God.

If Jesus was referring strictly to himself and God here, he would have said something like:
"Very truly I tell you, I can do nothing by myself; I can do only what I see my Father doing, because whatever the Father does I also do."
Certainly, this would be a more appropriate statement for Jesus to make if he was referring specifically to himself.

Why wouldn't Jesus do this, and speak in the first person instead of the third person if he were speaking literally of himself?

Because Jesus was referring to a role - not a specific individual. Yes, he was conferring that he was in that role - but this role was not exclusively himself, or else he would have just said "Jesus" or "me."

We do find that Jesus does make a similar statement about himself directly, later on:
“When you have lifted up the Son of Man, then you will know that I am he and that I do nothing on my own but speak just what the Father has taught me." (John 8:28)

 

Is Jesus' referring to dependency?

Jesus was responding to those wanting to criticize Jesus, saying that Jesus was putting himself equal to God. Jesus clarified that just as a son is dependent upon his father, he was. 

Jesus is suggesting that he is dedicated and dependent upon God, just as a son is dependent upon his father.

In response to the Pharisees' complaint about Jesus, Jesus is also indicating that his followers have the opportunity to regain their relationship with God and become dedicated to God. 

What kind of relationship? Taking shelter of God. Becoming dependent upon God.

Such is the opportunity for each of us. Any of us can choose to take shelter in God and become one of God's dependents. One of God's lovers. This is what Jesus is trying to teach his students.

Jesus was also illustrating that indeed, he is to be included as someone who has taken shelter in God. 

This occurs in any loving relationship. A person who loves another will do the will of and act on behalf of the one they love. This is the essence of Jesus' life and the essence of Jesus' relationship with God.