The story is indeed called "Rex" (1934) by Harl Vincent. It was first published in Astounding, June 1934 (Internet Archive link).
He was originally a surgeon of robots, but yes, a surgeon:
Here was no ordinary robot like those innumerable others engaged in the performance of man’s tasks, but an aristocrat among them — a super-robot.
The robot-surgeon, it was sometimes called.
He organizes a robot revolt:
In one stroke was obtained control of nearly a billion robots, and, through this, dominion over the three hundred millions of human beings. Rex had justified his name; he was virtually king of United North America.
He removes the centre of human emotion from people he wishes to control:
There were the familiar skull outlines and the configurations of cerebrum and cerebellum. The focus altered and came sharply to a point where some of the cells had been removed and where an opaque spheroid was encountered.
"What foreign object is that?" asked Innes.
"It is one of my discoveries," Rex answered. "An important one. It replaces the center of emotion and human feelings in Shelby's brain, making him a slave to my every spoken and radioed command. Otherwise the power of his mind is unimpaired.
And seeks to implant it in himself:
Shelby’s eyes were like polished bits of black glass, and his voice was devoid of feeling as he replied: "Rex is experimenting on himself. He is using the center of emotion which he removed from my brain, using the cells in an effort to provide himself with certain of the human sensibilities. You may as well know it now."
He succeeds, but believes he has failed:
"I have failed," he said. "I have analyzed every living cell in the tube, and have isolated the activating force of every human emotion. I have reproduced these forces to perfection with arrangements of special electronic tubes which have been incorporated into my own mechanical brain. Yet have I failed to produce so much as a semblance of human feeling in my make-up. It is the first failure of Rex — and the last!"
So saying, he stamped back into his own room and slammed the door. An instant later there was a violent explosion within, and the door by which he had entered was blown from its hinges.
Fielding, Shelby, and a few others rushed in when the smoke had somewhat cleared away. They found Rex a twisted and broken mass of metal and rubber and glass. The headpiece which had contained the marvelous thinking robot brain was completely demolished.
"He's committed suicide!" gasped Lonergan.
"Because he was a failure," Fielding added.
Shelby corrected him.
"He thought he had failed, whereas really he succeeded. At least two emotions stirred him before he did this, and he did not recognize them. Rage, when he dashed from this room and gave me the test tube. Despair, when he committed his last act. No, gentlemen, Rex did not fail — and now he is gone."
It appears you probably read it in Machines That Think: The Best Science Fiction Stories About Robots and Computers (1984). (Indeed I don't see any other collections that include both "I Have No Mouth, and I Must Scream" and "The Bicentennial Man.")