It may not be possible except for some of us some of the time: to be in the world, but not of it. Engaged, yet detached. To battle our enemies without becoming embittered or like them. To retain the equanimity of the monk in the midst of the world. To float like a lotus blossom without getting wet.
Or to paraphrase the Bhagavad Gita: to enter and partake of the fray but with detachment from the fruits of action.