What should I do if I feel that all my good deeds have ulterior motives?
Replying to Gurary, the Rebbe rejected the claim that absolutely all his actions had ulterior motives: some were sincere. He advised him not to spend time on the yetzer hara's false accusation. One should also continue Torah and mitzvos even with imperfect motives, because doing them shelo lishma leads to lishma.
This answer was given to a specific person, not as a general rule.
Quote from the source«a person must continue doing Torah and mitzvos even with ulterior motives and eventually his motives will be pure.»
- Author
- The Rebbe
- Source
- A Chasidisher Derher — 5778 — Issue 62 (139) - Cheshvan, p. 39