Outside people tend to judge you on what you do, not on what you intend. The latter is invisible to them - they can't reach into your mind and understand what was going on. So from an outside perspective, someone who breaks the agreement because they want to and someone who breaks the agreement because they mentally have to is indistinguishable.
This is true. First, get help from a therapist. Second, if you're finding yourself unable to focus on the actually assigned work, but something still useful, try to sell your bosses on it. If you can't convince them, and still can't regain focus, hopefully your therapist/doctor can help you find a way to regain that focus.