Well, the movie came out much later than the song, and the Beatles didn't really have anything to do with it. If you want to be depressed watch "Let it Be."
The Beatles wrote and recorded "Yellow Submarine" and all the other songs used in the film, but the film itself was put together years after the recordings. All the non-singing voices in the film (including the dialogue for John, Paul, George and Ringo) were done by John Clive, Geoffrey Hughes, Paul Angelis, Dick Emery, Lance Percival, and Peter Batten. The Beatles weren't involved with the movie. It wasn't until they saw a cut, and liked it, that they agreed to appear at the end in a short filmed sequence.