Personally I think Rachel hallucinated the entire thing (Zack coming to kill her) because she heard that he was sentenced to death because of her crimes. So, she hallucinated that he came to break through the window and kill her. When in reality, she just jumped out of it by herself, ending her own life.