Alan Dean Foster's Novelization covers this.
The scene is pretty long but I have bolded the "what he was thinking" parts.
“Han Solo.” Kylo Ren stared across at the older man.
“I’ve been waiting for this day for a long time.”
“Take off that mask.” Han’s tone was a mix of command and empathy. “You don’t need it. Not here. Not with me.”
“What do you think you’ll see if I do take it off?”
Han moved forward slightly. “The face of my son.”
“Your son is gone. He was weak and foolish, like his father.” Ren’s reply was replete with pity. And anger. “So I destroyed him. But such a small,
insignificant request is easily granted.” ...
Reaching up, he slowly
removed the mask. For the first time Han saw the face of his son as a
grown man—and it jolted him.
“That’s what Snoke wants you to believe,” Han was saying. He wasn’t
pleading—just stating a fact. “But it’s not true. My son is still
alive. I’m looking at him right now.” ...
Ren’s eyes blazed. “No! The Supreme Leader is wise. He knows me for who I
am, and who I can become. He knows you for what you really are, Han
Solo. Not a general, not a hero. Just a small-time thief and
A trace of a grin flashed across Han’s face. “Well, he’s
got that part right.”
onto the walkway, Han moved toward his son. There was no hesitation in
his stride or in his voice. “Snoke’s using you for your power,
manipulating your abilities. When he’s gotten everything he wants out
of you, he’ll crush you. Toss you aside. You know it’s true. If you
have half the ability, half the perception that I know you do, you
know that I’m telling you the truth. Because unlike him, I have
nothing to gain from it.”
“It’s too late,” he said.
“No, it’s not.” Halfway across the walkway now, Han continued to move
forward, smiling. “Never too late for the truth. Leave here with me.
Come home.” Without the slightest trace of malice or deception, he
cast a dagger. “Your mother misses you.”
A strange sensation touched
the younger man’s cheeks. Something long forgotten. Dampness. Tears.
“I’m being torn apart. I want—I want to be free of this pain.”
Han took another step, then stopped, waiting. A decision had to be made,
and for once it was not his to make.
“I know what I have to do, but I don’t know if I have the strength to do it.” Ren moved out onto the walkway toward Han. “Will you help me?”
“Yes,” Han told him. “Anything.”
Halting an arm’s length from his father, Ren unclipped his
lightsaber, looked down at it for a moment, and then extended it
toward Han. For an instant that seemed to extend into forever, nothing
happened. Smiling, Han reached for the weapon. Then, as the light from
outside was fully blocked by the flow of descending, accumulating dark
energy, Ren ignited the lightsaber—and the fiery red beam lanced
outward to pierce Han’s chest from front to back.
“Thank you,” Ren
murmured, and truly, the darkness above was mimicked by the darkness
in his voice.