When a person performs a mitzvah, his awareness and intent (kavvanah) affect only the quality of the mitzvah but not the fact that it is a mitzvah.
For a mitzvah, by definition, is an act that constitutes the fulfillment of a divine command, an act that is inherently and objectively holy, regardless of the performer’s intent.
But in the case of an act that is not itself a mitzvah, such as eating an ordinary meal, the holiness of the act depends on intent.
Without the appropriate intent, it has no holiness and is pure kelipah.
And the higher the level of the intent, the greater its honesty and sincerity, the higher the level of holiness the act achieves, until it reaches such a high level that it is equivalent to a korban offered in the Holy Temple.
–Rabbi Adin Steinsaltz