Believe me I understand. I am a mother of a 24 yrs. old girl who went through the same thing around age 3. Although she is my only child, that made it even more difficult because she wanted my undivided attention. So what I did was let her get in the bed with her dad and I in an effort to put her to sleep. After she fell asleep I would carry her to her bedroom and tuck her in.
After about a week, I had built trust, so I started getting in the bed with her until she went to sleep. Finally, I had graduated to sitting at her bed side until she fell asleep. Yes, it was a tiresome process and probably would not be recommended by a professional but it worked. About 3 weeks went by and she was on her own. All I had to do was say our prayers together and cut off the room light.
I concluded that she just needed to know that I loved her still. See, at that time her dad and I were spending alot of time together watching TV around her bedtime and she was jealous. In your situation, I believe your child is in a panic because another baby is on the way and all the attention will be on the new baby. Trust me kids are smart...
HOPE THIS HELPS:-)
P.S. My daughter has a son of her own and just this past Christmas I found myself putting both of them to sleep (LOL) It never ends!