I think that Sherlock is saying "how would you know" because he now knows that he is lonely. Before he, like mycroft just thought that this was the way smart people felt but since he's been friends with John and Gregg and Mrs. Hudson and Molly he knows that the feeling he's always had is loneliness and he recognizes the symptoms in mycroft. Mycroft has never had friends so he doesn't know the difference.
It's kind of like how when they were little they both thought that mycroft was smart and Sherlock was stupid. But then they met real people and discovered that they were both geniuses. Sherlock has slowly become more human and Mycroft hasn't. So I think actually by the end of the third season it is Sherlock who is the smart one because he realized that people need people and that friendship and love are more important then even the work. Mycroft still doesn't understand that though he did save his brother's life.