Thank you for your good question!
According to Gyan, this is a movie. It is called the “Drama.” Whenever there is ego “popping up” we will inflict pain upon ourselves.
How? By talking to ourselves that what is happening we do not deserve it or the opposite, that I am “not good.” Ego thrives in its own drama made of thoughts. At any rate there is no acceptance of what is going on now and even though, we have the intellectual understanding that “everything is beneficial” we still doubt it and even we inflict pain upon ourselves through waste thoughts.
Accept that there was a mistake, learn from it and move on. To settle this karmic account depends solely on yourself. Your boss can say anything he wants, but that shouldn’t matter at the end of the day. It is just a job. It is a paycheck for you and nothing else.
When you have spirituality and spiritual knowledge, our priorities will change. If things are not suitable for you to stay in that environment, make the steps to leave and get another job. It is not worth to stay there and with that experience, you could offer your services someplace else and start from “scratch.”
We make mistakes. It is part of the experience of living. If we have not learned from them, we will repeat the “story.” There is no point on feeling guilty or “hating ourselves” for something that will repeat again in 5000 years… Think about it!
Learn and move your position from that pain quickly, that is have inner flexibility to look at things from another angle; the one which will allow you to grow by becoming aware of that ego.