Meaning of "I shut my eyes to hold my breath"
Solution 1:
It doesn't mean anything. The lyrics are deliberate nonsense, full of contradictions.
Consider :
It rained all night the day I left, the weather it was dry;
The sun so hot I froze to death—Susanna, don’t you cry.
The weather is both rainy AND dry. A contradiction. The sun was hot, but the singer froze. Another contradiction.
I jumped aboard the telegraph and traveled down the river,
How is it possible to travel on a telegraph? It isn't possible, it's nonsense.
I shut my eyes to hold my breath
There is no connection between shutting eyes and holding breath. It's a non-sequitur. Another piece of nonsense. It doesn't mean anything, and that's the joke.