One who trusts in H'shem, his intention in pursuing a livelihood is not to make money or receive the honor. Rather he understands that by going out to work he has a unique opportunity to serve H'shem in the way he trusts in Him, and helps others. GD commanded us to be "involved in the world" to bring the world to its ultimate purpose of making H'shem's name great
pg 449
Nefesh HachaimOne who finds himself doing Mitzvot or learning Torah for reasons such as prided or honor and knows that he should be doing them for their own sake, says the Gemara he should not give up but keep at it constantly and he will eventually reach the level of doing them for the proper motives.
Prologue to Gate Four Chapter 3 pg 122/123