In the book “May I Answer That”, Swami Sivananda answers the question “How to free ourselves from Karma, Swamiji?”.
Feel, as you do your daily duties, that you are only a witness of all that goes on around you, of even your own actions. This is called Sakshi Bhav. You should inwardly realize that you are different from the active principle in you. This is the method of Vedanta.
There is the other – easier, but equally potent method of Nimitta Bhav. Feel that the Lord alone is the real doer of all actions and that you are an instrument in His hands. Your actions will be transformed into worship of the Lord, and you will not be bound to them. Work without expectation of any reward and without egoism. Root out the idea of agency; feel, “I am not the doer”. You will be freed from the shackles of Karma. You will not accumulate new Karma. Allow your Prarabdha Karma to work out; and you will attain liberation.