Problem comes in when you take into account color, sound, pain, etc. How does the brain keeping track of itself produce conscious sensations? They're not coming in as such from the outside world. It's just EM radiation, vibrations in the air, molecular motion on the skin, etc. Our nervous system turns that noise into sensations.
It's easy to see this problem when you think of how you might go about making a conscious robot. A sophisticated robot can keep track of its sensory inputs and adapt its behavior. But what would you add to turn that into colors and sounds and feels?
The common thinking along those lines is that you would add introspection and nothing more. That is, "red" is the brain's interpretation of the brain processes that happen when light of some wavelength is hitting the retina (or perhaps we need a few more layers - the brain's interpretation of the brain processing the information that the brain is processing the information that [...]).
Under this general idea, emotions would be similarly explained as analysis of other brain processes, ultimately reacting to even older (evolutionarily speaking) mechanisms for motivation and goal-seeking.
Maybe you don't experience selfhood in the same way that I do? Or maybe you just find it easier to disregard that aspect than I do.
I score quite high for psychopathy and I didn't understand emotions for a long time (as a kid I imagined that people just pretended to have emotions), so the lack of that emotion processing capability, may influence my view in that topic.
Either my brain is defective or it's this century version of geocentrism.