Feeling of forcing oneself to do something

The word I would use in this situation would be grudgingly. In essence it can be used to express that a task is being reluctantly or unwillingly completed.

Grudgingly:

done, given, or allowed unwillingly, reluctantly, or sparingly

From Oxford Languages (which definition connotes the emotion of resentment):

grudg·ing·ly

in a reluctant or resentful manner.

"I grudgingly accepted his apology"


Sometimes people do things out of a sense of duty, so a daughter might dutifully tend to her elderly mother even though the motivation for so doing has long gone.

She goes through the motions because she feels she ought to.

As Lily rightly points out, "duty-bound" introduces the sense of being forced into doing something. Well spotted, Lily.