This is a recurrent theme in the Gita. Lord Krishna tells Arjuna to remain detached from the material world, but to also continue doing his duty to the best of his ability. We know from personal experience that this is easier said than done.
For instance, I would be okay giving my heart and soul into my office work, but that’s also because I’m attached to the results. If I was to be given a zero salary, zero bonus, zero increment and no promotion, would I be able to work as hard? That is probably the real test of my detachment. Ironically, if I can work this way, then all the salary and bonus and promotions will likely find its way to me automatically!
One lovely example of detachment as explained by Sri Ramakrishna is that of a baby’s nanny. The nanny knows very well that the child is not hers. Yet she lovingly takes care of the baby for many years and gives it unending love and care, probably more than it’s mother, who is caught up in the vagaries of her professional life. The nanny may even have her own little children who she is unable to be with. But that does not come in the way of her work.
Even so, the nanny knows very well that the baby is not hers, and that any day her mistress may ask her to pack up and leave. Thus there is constant mental detachment, while physcially she takes care of the baby as her own.
Can I mirror this in my office work? For anything around us where we believe we are getting too attached, we can remind ourselves that we are merely caretakers (like the nanny), and not owners. Because the real owner is the One who created us all.