It depends upon the situation and group maybe. If you are walking on stage to give a talk, for example, you can address the person who introduced you first (or get someone to introduce you so you have that one to one connection to start with) and start by thanking the person and then turn to do the same to the larger audience. This leads you into having a group/individual connection sort of thing.
If it is a party or meeting, if you are the center of attention, like if you walk in late, you can briefly address everyone by saying "Hello everyone", then you can focus on just one or a few people directly in your immediate space, and so not focus on the larger group.
If your heart is beating quickly and you get a surge or nervous anxiety, I'd suggest not to speak much immediately. Shake someone's hand, or just stand and look around, and take a few good deep breathes and try to relax a little.
It may help to preplan doing this before coming into contact with a large group.
Even some of the most famous entertainers in the world got the gitters, stage fright, sickening feelings upon first stepping out in front of a large group...it's normal. It's what you do with it that matters. Luciano Pavarotti said that he would become "as frightened as a little child" just before going on stage to sing. But, it seems he framed this terror as an integral part of doing something he dearly loved to do, and that he was confident in.
So, if it is something you enjoy doing, and if you like these groups, then you can learn to handle the phases of doing it, including the momentary terror. If it is something you do not like and something you would want to avoid...then think about that. Maybe you want to have someone with you. Perhaps you'll want to make some rules, like no talking for a few minutes when entering a crowded room.
I remember the looks of people's faces sometimes many years ago when I would do just what you describe, walk into a party and just ramble and stumble over words like a scared rabbit. Luckily there were usually friends of mine around who knew I was not mentally ill and they understood I was just nervous
. Otherwise I would probably not ever have been invited to a party again.
So, in conclusion, if it is something you want to work on, work on it. Take classes, workshops, seminars, read books, practice being in groups, try different things...
But know you are not alone. Being in front of large groups is not easy for a great many people, including some very great public figures. Have you seen "The King's Speech"? I would highly recommend you see it. It's awesome, especially for someone like me who was deathly shy half my life.
Carry on.