In the Royal Artillery, remember that the guns are the colours, and a gunners’ rallying point is the nearest gun that will fire. The gunners may be separated from the guns in order to take cover in shelter trenches under bombardment, but one the order is given to take post, they will stick to their guns, and spike them rather than permit their capture. However, infantry combat is not what they draw their pay for, and until quite late in the war RA batteries were not even scaled for a full issue of small arms for self defence.
The Gunners are of course “First among the ladies, an’ amazin’ first in war”, but in the case of anti-tank guns the detachments might not be artillerymen, they might be infantrymen. In this case they will, of course, be capable of doing the infantry stuff if necessary. At Medenine, when his gun was knocked out (after bagging 14 panzers at close range, for which he would be awarded a DCM) Sergeant Crangles took over his detachment’s Bren, and ordered them to fix bayonets. He later ordered them to surrender, as the platoon in their locality had been completely overrun.
All the best,