Dreams are a tricky subject for some as are internal dialogues. How do you bring them into the fold of the manuscript and do they even add to it? Does it distract the reader to be trucking along reading in the present and then have to shift into some alternate past life the character wants to reflect upon? Lots of questions and as always it is in the writers best interest to make sure that they first know their character well enough to take such a journey, but also that the writer understand the current standard on how to make that transition. The most important thing I believe must be to establish a smooth movement from one state to the other, otherwise the reader will be left jarred or worse outright confused.
So first do you or do you not introduce the dream or internal aside? The first question you should ask is of course does this do anything to help drive the story forward? Also, will the reader eventually get a pay off for reading the information? I once read an entire series of books, seven I believe, where I was able to literally skip every passage that was italicized. It became obvious that each of them added nothing to the story and were there merely to add word count, or extra background to character development. So be careful on this because it is easy to slide into this pitfall, writers love to give back-story to their characters, but at some point this diatribe must help drive the story. Meaning it has to be a reason for the character to want to grow, to develop, to escape his past and be better, etc.
So now you have accepted that you are going to put the dream, the internal dialogue, or the passage of 'five years earlier' into the book; now what? A consistent method must be formed that will signal the reader that you are about to enter such a new time or altered state of mind. Some writers straight out type out the time of the event they are about to describe, others indent. For dreams I tend to indent or italicize, but this is currently my preference a publisher I suspect will have a hand at the final look of this. Other methods include physical separation of the stories via page breaks, asterisks or dashes. There can also be unique ways of showing past thoughts by your character uncovering notes, letters, or media from the long lost reletives or lovers then clipping the excerpts from these finds into your story. In any event, make sure the reader knows where they are headed and why.