There is a reason why your horse gets upset when put into a stall. As some have suggested, you can ignore the behavior and it will eventually improve. However, ulcers are very expensive to treat so I personally try to avoid them. A horse that goes off his feed and stresses for a day or two can easily develop ulcers. Also, if you do go that route, make sure the horse is being safe in the stall. I've seen horses fall and injure themselves in stalls as well as cut legs open on water buckets.
So...what is the reason? Does the horse never go into a stall and this is a new experience? Have you switched stalls around? Is the stall too small and claustrophobic? Can the horse see other horses? Is it related to separation anxiety?
To avoid illness and injury, I try to make it easier for the horse to adapt. If it is related to separation anxiety, bring the horse's friend and put him outside the stall until the horse is calm, then gradually bring the friend horse farther distances away. Sometimes if stalls have been switched around, you can find a stall the horse likes better...perhaps closer to a horse he is comfortable with.
Most horses that sweat and panic when put into a stall are just not used to being in a stall. Are you only putting the horse in a stall for vet care? If so, you need to adjust the horse to walking in and out of a stall before the vet is necessary. When he is comfortable standing in the stall with the door open, close the door for just a little while then let the horse back out. Bring a buddy horse along to help him stay calm. Sometimes if your horse only needs to use a stall for vet care, all you need to do is tie another horse outside while the horse is being treated.
Anxiety and fear are not really behaviors. They can cause behaviors. You might have anxiety and fear on an airplane, and it might make you flail around and jump out of your seat. Restraining you will not help your anxiety or fear. If you can't be safely restrained, you may harm yourself or others. It may also harm your health to have a very high blood pressure or heart rate. Horses also may come to harm from anxiety and fear. In my opinion it is better to treat the anxiety and fear rather than hope the horse won't get too stressed and colic, get ulcers, or injure himself.