The excerpt above reflects the idea that Tom's faith is being tested. Focus on the part of the quote, " - that it was vain to serve God, that God had forgotten him." Tom is questioning his faith, saying that his God had forgotten him, that it was vain to serve his God, and referencing his soul bitter thoughts.