Hypnagogic regression
Hypnagogic regression was the medical term used for some phenomena termed "flashbacks." (VOY: "The Raven")
In 2374, The Doctor diagnosed Seven of Nine with hypnagogic regression as a result of her Human physiology, through psychological symptoms, trying to assert itself over her Borg components. (VOY: "The Raven")
This is a physical version of the storytelling flashback device.