One should study Torah and do mitzvos even if not for their own sake, for doing so will eventually result in study and performance for their own sake (Pesachim 50b).
This Talmudic statement has given rise to questions by the commentaries. Why is the Talmud condoning study of Torah for ulterior motives? What happens to the emphasis on sincerity in observance of Torah and mitzvos?
Acting "as if" can be constructive. If a person who suffers from a headache goes on with his or her activities "as if" the headache did not exist, that headache is more likely to disappear than if he or she interrupts activities to nurse the headache. "Rewarding" the headache by taking a break only prolongs it.
Study of Torah and performance of mitzvos require effort, may be restrictive, and may interfere with other things one would rather do. Under such circumstances, there may not be great enthusiasm for Torah and mitzvos. However, if one nevertheless engages in Torah and mitzvos "as if" one really wanted to, the resistance is likely to dissipate. The reasoning is that since one is determined to do so anyway, there is no gain in being reluctant, and true enthusiasm may then develop. On other hand, if one were to delay engaging in Torah and mitzvos until one had the "true spirit," that spirit might never appear.
It is not only permissible but also desirable to develop constructive habits by doing things "as if" one really wanted to.