I believe this was answered in the books.
The voice in Rand's head is a manifestation of madness caused by The Taint, as Cadsuane and others have stated in the series, but also Rand's way of dealing with being the Dragon and what he's destined to be and do.
From The Gathering Storm, Midnight Release signing
Was the taint influential in the creation/development/existence of the
voice of Lews Therin in Rand's head?
BRANDON SANDERSON
Brandon
answered that the taint was influential, but not the only factor. He
referenced Semirhage, that of course we can't believe the Forsaken
always, but yes, that the taint was an influence in the the voice.
That we have to accept that in fact, in a way, Rand is going insane
(as in as the books progress).
So what are the other Factors?
From the Robert Jordan, New York Barnes and Noble signing on January 7, 2003:
Q:The question is, with Rand and LTT, do they have 1 soul or 2 souls
in the body?
A: They have 1 soul with 2 personalities. The reincarnation of souls
does not mean reincarnation of personalities. The personality develops
with each reincarnation of the soul. This is the cosmology that I
[cobbled] together
We know that Rand is the personality of the Dragon we follow in the series. Lews being there as a distinct true personality doesn't fit with the information above.
However Rand is going through two things -
1. Sharing the soul of the Dragon with another personality
2. Making himself hard, supressing emotion as this is how he feels he needs to be.
The only way that he can accept also being the previous Dragon is to compartmentalise "Lews" away.
We can see this here and in other occurrences:
In his room at The Counsel's Head, Rand sat on the bed with his legs
folded and his back against the wall, playing the silver-mounted flute
Thom Merrilin had given him so long ago. ... The tune was called
'Lament for the Long Night', and he had never heard it before in his
life. Lews Therin had, though. It was like the skill at drawing. Rand
thought that should frighten him, or make him angry, but he simply sat
and played, while Lews Therin wept.
Winters Heart, Chapter 25, Bonds
When Rand has his epiphany -
Why do we live again? Lews Therin asked, suddenly. His voice was crisp
and distinct.
Yes, Rand said, pleading. Tell me. Why?
Maybe… Lews Therin said, shockingly lucid, not a hint of madness to
him. He spoke softly, reverently. Why? Could it be… Maybe it’s so that
we can have a second chance.
...
Within that moment, suddenly something amazing occurred to him. If I
live again, then she might as well!
The Gathering Storm, Chapter 50 - Veins of Gold
The she is Ilyena, who Lews killed in his madness and the thought is Rand's, implying that he is finally accepting the portion of him that is/was Lews.
The voice stops when Rand accepts his destiny (emphasis mine).
For they were not two men, and never had been.
He regarded the world beneath him. The clouds above had finally
broken, if only just above him. The gloom dispersed, allowing him to
see the sun hanging just above.
Rand looked up at it. Then he smiled. Finally, he let out a
deep-throated laugh, true and pure.
It had been far too long.
The Gathering Storm, Chapter 50 - Veins of Gold