Transliteration
athaitad apyaśakto’si kartuṃ mad-yogam āśritaḥ |
sarva karma phala tyāgaṃ tataḥ kuru yatātmavān || 11 ||
Translation
If, however, you are unable to work in this consciousness (Consciousness of Shri Krishna), then try to act giving up all results of your work and try to be self-situated.
Purport
In the earlier Shloka, Bhagavan Shri Krishna suggested if you can't practice Bhakti yoga or meditation, try to do your activities with the intention that you are doing it to Me(Shri Krishna).
But even that is not possible for some reason. Shri Krishna gives yet another option. Bhagavan Krishna said please do your action leaving the desires of its benefits for yourself. That means do your duty without any selfish intentions. Such actions done without the desires of the fruits for self is considered as devotion to God.
Here we have to notice that in this kind of action, the human is not bound to think of God, Any action done without the desires of self benefits from the fruits hence becomes the devotion towards God.
If we go further into such details, such actions which are done to benefit other human or living being is equivalent to the devotion towards God even though the person did not hold God in his mind even for a moment.
That explains even atheists if doing service unto the human or other livings beings are doing devotional service.
Devotion as many assume acts where humans have to offer their services to God, chant his name, worship him, and perform all rituals and pilgrimage.
As per Sanatan Philosophy, an act done in the service of the welfare of other living beings is equivalent to devotional service. This is one of the biggest and most subtle concepts of Sanatan Dharma that it's not entirely dependent upon God to follow Sanatan Dharma. In fact, one may follow Sanatan Dharma even without knowing anything about God.
God as per Sanatan Dharma is not an entity that needs anything from a living being, God is free from all needs, all desires, and all expectations. He is free from all modes, all emotions.