Ah, you want to the Murderbot Diaries. It's got both of those two things in spades.
"As a heartless killing machine, I was a terrible failure."
“I was having an emotion, and I hate that.”
“I liked the imaginary people on the entertainment feed way more than I liked real ones, but you can’t have one without the other.”