The Night Listener
(2006)

It turns out that Pete isn't a real person after all.  Gabe (Robin Williams) learns that the boy is in fact a made-up character by Donna (Toni Collette), who apparently had something happen in her childhood that messed her up to begin with.

The movie ends with Donna getting a new look and explaining to a real estate agent that she's excited to have a new home for herself and her sick little boy.

Thanks Robert W.!