This is an idiom. Possible meanings are that 1) he thought that he would die soon, or 2) he lay in the dust because he was very sad, or 3) he realized that he desired the worthless things of the earth. (See: [[rc://en/ta/man/translate/figs-idiom]])
What a person does or how he behaves is spoken of as if it were a road or way. AT: "what I have done" (See: [[rc://en/ta/man/translate/figs-metaphor]])