1. Shit code is in the eye of the beholder. Most programmers think code they didn't write qualifies as shit. I see it as an opportunity. Learn it, fix it, make it better, that's part of the job. What did you expect you'd be doing that makes this job seem so bad? A programmer who can competently work with legacy code without whining has a valuable and rare career skill, so get good at it and increase your value.
2. I don't get invested psychologically in code, and certainly not physically. Get some perspective.
3. Martin Fowler's book Refactoring has some good advice and techniques.