Sabalenka got off to a poor start against the 26th-ranked Mertens but picked up the pace to comfortably close out the match at the Caja Magica centre court on Sunday.
The two-time champion in Madrid won 3-6, 6-2, 6-1 to keep alive her hopes of reaching the final for a third straight year.
Sabalenka won the title in 2021 and 2023, and finished runner-up to Iga Swiatek last year.
"I think it's one of those days where I didn't feel my best and I got super emotional in that beginning of the first set and put myself in a tough situation," Sabalenka said.
"I'm really happy that I was able to bring such a high level in the second and the third set, especially against someone like Elise.
"If you give her any chance, she's going to be there fighting and putting you under pressure, so really happy with the way I turned around this game."
It was Sabalenka's ninth consecutive victory over Mertens, her doubles partner while winning the 2019 US Open and 2021 Australian Open. Sabalenka had won 14 consecutive sets against the Belgian.
"She's such a great player. It doesn't matter the score between us, it's always a great battle," Sabalenka said.
Sabalenka will next face either Rebeka Masarova or Peyton Stearns.