M.P.
You must be frantic! If you're angry take many deep breaths, say over and over, "I am calm and I can handle this. Then grab that little one and hold him until he calms down.
I agree that a "screaming, raving, defiant aggressive two year old should not be locked in their room. They are likely to hurt themself and destroy the room. The time to shut them in their room is at the very beginning when they're protesting in a mild way. "I know you don't want to go to bed but it's bed time" with a hug and "good night". When he comes out calmly put him back to bed without saying anything for as long as it takes.
I suggest locking a 2 yo in their room increases their anger or causes fear because they are unable to understand what you're doing.
Why is he this out of control? I suggest by this time, he's overly tired and needs you to take control this minute. He's now more agitated because he's scared. He knows he's out of control and so are you. He needs to know that you will take care of him by taking control of him. Gamma G explained very well how to hold him. Do this calmly and without anger.
I rarely recommend spanking/hitting but because he is hysterical I suggest you do swat him on the butt to break the action. A quick swat to surprise him, done calmly, without anger.
If this behaviour is frequent, I urge you to get help. He may have something like a sensory processing disorder. This behavior can also go along with being on the autism spectrum. The school district will evaluate and help you with treatment for free.
Whether or not he's on the spectrum you need to learn more effective ways to parent/discipline. I suggest readind Love and Logic by Foster Cline and 1-2-3 Magic. There are many good books outlining different ways to parent. You can find them in the library. His actions may be more than a discipline problem. Have you read the chapters on meeting a childs needs? Does he have naps and a calming consistent bedtime routine at an early enough hour that he's not overly tired?
BTW I suggest you don't understand the uses of time out and ignore until it goes away. A time out doesn't usually work at two. And if it might it would only work when the child is calm enough to sit for 2 minutes. You have to keep putting them in one place until they stay there voluntarily for 2 minutes. Not likely to happen with a two yo.
And ignoring it only works for such behaviors as whining. One cannot ignore active misbehavior. How is a baby/child to learn how to behave if they are led to believe what they're doing is OK because you're ignoring it.
I urge you to join a mom's group for support. Parenting is the most difficult job in the world.