Is it Hide and Seek (2005), with De Niro?
Widowed psychologist Dr. David Callaway (Robert De Niro) and his daughter Emily (Dakota Fanning), with whom he shares a troubled relationship, move after Emily's mother, Allison (Amy Irving), apparently commits suicide. David meets local woman Elizabeth (Elisabeth Shue) and her niece, Amy, who is roughly the same age as Emily. Hoping to cultivate a new friendship for Emily, David sets up a play-date for her. The play-date is spoiled however when Emily cuts up the face of Amy's doll. Despite the unsuccessful play-date, David and Elizabeth hit it off, though Emily acts in a hostile manner towards her as well.
A family friend, Dr. Katherine Carson (Famke Janssen) - herself a fellow psychologist, visits David and Emily to try to help David and talks to Emily about her obsession with Charlie, her only new (and imaginary) friend. Later, Elizabeth visits again, hoping to make peace with Emily. When Emily says she is playing hide-and-seek with Charlie, Elizabeth indulges her by pretending to look for him. However, someone pushes Elizabeth out the window to her death. When David asks Emily who did it, once more she blames Charlie, admitting Charlie "made her help him". A distraught David, armed with a knife, goes outside, where he meets his neighbor. He assumes his neighbor is Charlie and cuts him with the knife, after which the suspicious neighbor calls the police.