1. The passage is describing loneliness and struggle. According to the following phrase:
"He was leaning against the ledge of an open lattice, but not looking out: his face was turned to the interior gloom".
The passage demonstrates the inner struggle and loneliness of the character. He was carried away by his own emotions(thoughts and feelings) of approaching a dead end as implied in the phrase:
"the fire had smouldered to ashes."
The environment was cold and silent as seen in the following words/phrases:
damp, "mild air", "cloudy evening", and "so still".
2. The overall mood, atmosphere and underlying idea of the passage insinuates struggle and loneliness. The character is facing challenges and problems in his life as seen in the following phase:
"Never can there come fog too thick, never can there come mud and mire too deep".