In a 4-quart stainless steel saucepan, melt the butter over low heat. Add onions, mix to coat the onions, cover and sweat them for 45 minutes, stirring occasionally.
Uncover and increase the heat to medium-high. Cook, stirring frequently, until the onions are glazed and golden, about 15 minutes.
Add the balsamic vinegar and boil down for 2 to 3 minutes to glaze further. Reduce heat to low, add the wine, and cook, stirring often, until the onions are soft and a beautiful deep brown, about 1 1/2 to 2 hours.
Stir in the ham. Serve hot, at room temperature, or warm.