Back in the age of sail it wasn't uncommon for naval action to turn to boarding an enemy ship if I recall right, so did sailors for any of the world's navies (British, Spanish, Dutch, French, etc) receive any formal training in how to fight in close quarters? Or were seamen just handed a cutlass or an axe and told to have at it?
Yes, training in small arms was part of weekly drill on many ships in the British navy, but each captain was fairly autonomous so his personal preferences and chain of command might dictate how often and with which weapons. Rather famously, the French Redoutable's captain, Jean Jacques Étienne Lucas, placed a heavy emphasis on small arms training with his crew; his sharpshooters are who mortally wounded Nelson at Trafalgar.