If you're not willing to walk away, you're not negotiating -- you're just having a conversation about salary. You've already decided you're staying; the only thing being decided is how much money your feelings are worth. Not a good spot to be in, for either you or your boss.
I like this author's advice to do a lot of research beforehand and have a realistic idea of where the market is. You should also have a realistic idea of what it would cost to replace you -- probably much more than market salary for a similar job. You need to have an honest -- and fun -- conversation about rates. To start that conversation, you need to be clear with your boss that the starting point is your leaving to find a better job. (But this must be a true statement!) Given that starting point, you both talk and share information about how to reach an agreement you both like.
Yes, the emotional part is the worst. That's why you make those tough emotional decisions before you walk in the door. It's also why you give your boss plenty of time to step back and think through things dispassionately as well. Coming in half-assed, with aggressive demands, is a good way to get fired. Coming in well-studied, with no pressure and just trying not to rock the boat, is a good way to stay at the same job and salary for the rest of your life. You have to learn the art of working between these two extremes.
It has always amazed me the lack of education we provide people in negotiation. It's the one business-related practical life skill that nobody can do without.