I just went through this in July! My daughter is the same age as yours and it is normal for separation anxiety to resurface again at 4 (especially with the new baby issue). My DD stayed with grandparents from out-of-town, too. We just talked about it often, let her see that we were excited, made sure she knew that she would come and see me in the hospital, etc.
We also totally bribed her with some of her favorite things - like Grandpa taking her to McDonald's for lunch and play time, lunch at Cracker Barrel with Grandma and Grandpa. They arrived a few days early and started taking over the bedtime routine so by the time I went into the hospital, that was normal, too.
I also stocked in several gifts (mostly small and a couple medium) and my mom and dad would give her one each day that I wasn't home (or use it to distract her if she was upset). These also gave her something to do when she visited at the hospital.
The big thing I think is to talk about it a lot and be excited about the baby. Explain why you and baby have to stay (so doctors can watch baby) but act like the hospital's no big deal. We explained about Daddy staying with mommy to help and that we did the same thing when she was born, too. My DD was nervous but it turned out fine. She had a blast w/ grandma and grandpa! They ate out, went for donuts, went to McD's - you name it ,they did it!
My parents really understood that we needed them to care for my oldest and they visited every day just once, and then devoted themselves to caring for her. They were awesome. especially since my oldest had pneumonia at the time! Yes, right before baby was due my 4 y.o. developed pneumonia and had to wear a mask to meet baby. That was hard but we all made it through - so will you! If your oldest is in school or Mommy's Day Out, I'd skip it for a few days before baby is born. Have some special time with her and minimize the chance she'll get sick right before. Trust me - it's not worth the risk of getting sick!
As for keeping you daughter with you in the room, that's a personal choice but I would advise getting as much rest as you can. AND taking this time to bond with new baby. I didn't want my daughter to see all the nurse checks of my incision, etc. She came, she saw baby, she laid next to me and I loved on her. Then she went home to her comfort zone and played and slept while I marveled at my new baby and slept!
Things will get crazy the moment you get home, so remember, your daughter knows you love her. She's with people she loves and trusts. Take this time to heal and stock up on sleep, and to devote all you have to the new tiny person in your life. Those first moments go so quickly - there is nothing wrong with having that time for the three of you (Daddy, too). Your daughter will be fine!!!
Good luck and congrats! Don't worry too much - she'll survive and won't be scarred for life (even if she doesn't handle it very well).
Hang in there!!!