To give a slightly different answer than other commenters:
To detach emotions from work without throwing out the value of good work: attach your self-worth to something UPSTREAM "doing good work", a cause of good work, and not the work itself. You do this by realizing that the emotional attachment to your own work was never really about the work, it was what the work implied about you; the emotional brain jumps to conclusions. Good work, when you zoom in as if with a better telescope, that you are responsible, capable, well-intentioned, generous, intelligent. These can be ends in themselves—you'll disappoint yourself when you fail to live up to them, for their own sake. Those are better ends—they let you say "I DID address everything I could think of but I missed something, I'd better learn from that", rather than feeling something you missed as a vague attack against your whole being. And because, you often try to prove we are all those things—fearing you're not—but fool ourselves with things that don't really prove it—like material wealth, or attention, or good grades. And then even if you succeed you are left with some guilt: "I got the good grades but I feel like I could have done something more important..."
You can take it further: those attributes, when you zoom in further, resolve further, into a feeling that you are worthy of existing, and worthy of love. In my experience (I have felt this, but I haven't learned to live like it), feeling "worthy of love" gives you permission TO love, to be good—which again you can invert. It's the right reason to be responsible, capable, etc—all of those flow outward from something deeper rather than being ends in themselves.
To detach emotions from work without throwing out the value of good work: attach your self-worth to something UPSTREAM "doing good work", a cause of good work, and not the work itself. You do this by realizing that the emotional attachment to your own work was never really about the work, it was what the work implied about you; the emotional brain jumps to conclusions. Good work, when you zoom in as if with a better telescope, that you are responsible, capable, well-intentioned, generous, intelligent. These can be ends in themselves—you'll disappoint yourself when you fail to live up to them, for their own sake. Those are better ends—they let you say "I DID address everything I could think of but I missed something, I'd better learn from that", rather than feeling something you missed as a vague attack against your whole being. And because, you often try to prove we are all those things—fearing you're not—but fool ourselves with things that don't really prove it—like material wealth, or attention, or good grades. And then even if you succeed you are left with some guilt: "I got the good grades but I feel like I could have done something more important..."
You can take it further: those attributes, when you zoom in further, resolve further, into a feeling that you are worthy of existing, and worthy of love. In my experience (I have felt this, but I haven't learned to live like it), feeling "worthy of love" gives you permission TO love, to be good—which again you can invert. It's the right reason to be responsible, capable, etc—all of those flow outward from something deeper rather than being ends in themselves.