What you'll be marrying will be the spirit of loneliness, yes. Unless there is strong upbringing of the kind or otherwise a factual relationship with a spirit that mounts on more than a mental game, with already consumed experience of life and respective age, sure. Otherwise absolutely not, all are delusions, sorry to break it off strongly. "Spirits" of the kind come and are really physical too, to assert and destroy any "mental and imaginative" things that may or may not be a growing phase towards.
The question is how would one know? By living and growing in this life and most importantly advancing. The path of union with some spiritual being is extremely rare, unique and intense in that sense, it is outside of the equation of doubt or otherwise other needs that need explanation or choice.