I think that the immigrant in this song is you or I. The "I" doing the singing is "God". There really is no pity here or, if so, it is somewhat sarcastic pity for the immigrant (person) who travels through life without conforming to God's instructions will suffer a terrible fate - "...when his gladness comes to pass." i.e. at the end of his or her life at the time of final judgment.
On another level, however, it seems to me to simply express a real compassion for all human beings who by the very nature of being alive must face the many complications of life and continual choices about how to make a good life for themselves whilst still caring for and respecting others. To me, in that sense, the song is a metaphor highlighting the helplessness and relative impotence of human beings as compared with the natural universe and sympathising with their lot, yet acknowledging that each person does have choices about how to live and cautioning that fulfillment will come from following true values rather than superficial, venal and material ones.