Melt butter in a large skillet over medium heat. Add onions and stir to coat. Cook, stirring occasionally, until darkened and collapsed, about 30 minutes, reducing heat as necessary to prevent burning. Add red wine and stir, scraping up any browned bits from bottom of the pan. Salt onions to taste and set aside.
Using your hands, combine beef, soy sauce, and Worcestershire sauce in a bowl. Divide beef mixture into 4 mounds and flatten into ¹/³-inch-thick patties (about 5 inches in diameter).
Heat a cast-iron skillet over medium-high. Season both sides of patties with salt and pepper, then cook for 3 minutes, pressing to flatten. Reduce heat to medium, flip, and top patties with Gruyère. Cover and cook 2 minutes more. Meanwhile, toast buns.
Spread 1 tablespoon mayonnaise on each bun bottom. Top with 1 burger patty and a pile of caramelized onions. Close burgers with top halves. Serve immediately.