The poem expresses happiness and sadness. It shows that if you focus on the positives then less negative things will happen but if the case is the other way around, then there will be ten times more negatives in your life.
“Her early leaf’s a flower, but only so an hour” is the most meaningful part of the poem. I think that he is referring to flowers bloom and they are beautiful, but only so for a short time. It tells that you may have good moments but sooner or later there will be bad ones too.