The short first scene of Act IV centres around Gertrude's betrayal of Hamlet. Although she does honour Hamlet's request to not tell Claudius that he is only feigning madness, it is clear that, having promised to help her son, Gertrude turns him in to her husband. The immediate and extremely frank way in which Gertrude reports the actions of Hamlet in killing Polonius show that she is well and truly on the side of her husband. Beyond this, the motives of Gertrude are up to your own individual opinion: some have argued that she truly believed Hamlet to be mad and thus wanted to help him by reporting him to Claudius, others say that she has recognised that her best interests lie in the camp of Claudius at this stage and this is why she betrays Hamlet. Either way, it cannot be avoided that it is this act of Gertrude that leads to Claudius' plan to have Hamlet killed. "Frailty thy name is woman" indeed!
A mother would not willingly betray her son to a dangerous murderer. Try to see this from Gertrude's POV. This evening Hamlet had behaved very strangely in public at 'the play'. The evening was a complete disaster that will start all sorts of gossip and problems. She believes Hamlet is deranged and that he has somehow made her new husband very scared and angry with his childish antics at the play. She has summoned him to her bedroom to give him a strict telling off and to try and bring him to his senses.
Then Hamlet rushes into her bedroom, yelling and shouting about her sex life and morality. He practically physically attacks her, making her cry for help in fear he might kill her. This makes Polonius cry out for the guards. Then Hamlet pulls out his sword and murders Denmark's most senior politician for no reason Gertrude can see. Hamlet then goes right back to shouting at her about her marriage, while the old man's blood pools on the floor. Then suddenly, mid-rant, Hamlet stops, points horrified at the empty air and has a conversation with a ghost that Gertrude can't see at all.
Is this sane behaviour from Gertrude's point of view? Is this just 'acting' mad?
Gertrude is truly terrified for her son's well-being. She doesn't betray him, she tries to help him. She still doesn't know Claudius is a murderer, she tells the king that Hamlet is mad because she wants to help Hamlet.
I see Gertrude as a rather oblivious character. To me, I would say she is only saying what she thinks. What is she protecting him against if she doesnt know Claudius killed King Hamlet?