In Chapter 13: "A Short Rest", after Bilbo steals the Arkenstone from Smaug's hoard, he thinks:
"And now I am a burglar, a thief in the night! But I have done it all for the sake of my friends!"
This marks his internal acceptance of the role Gandalf assigned him in Chapter 1.