He is transformed because of the combination of a series of events: a lenghty captivity, the traumatic loose of his hand, and yes, seeing true chilvary in Brienne. It is quite the ordeal, and it is pretty believable to me that these type of events would change his character, or anyone's, for that matter.
Yes, the nature of the relationship they shared has changed quite a lot. They reunite, she's dismissive, he's frustrated, aye. But "you can't have everything that you want in this world no matter how much of a rich boy you are " was suppoused to be a lesson that he already learnt. He has experienced for the first time in his life frustration, and thus, learnt to cope with that emotion (once again, loosing his hand was probably the most pivotal event that lead to the new and improved Jaime). But nope, back to square one because apparently, rough sex is somehow filmed in the same way as a rape *sigh*