Staples Inc. said Wednesday that it got European Union approval to buy Office Depot Inc., as the merger of office supply giants continues to face pushback from U.S. antitrust regulators.

Staples said if the deal closes, the combined company will divest Office Depot’s retail, online and catalog operations in Europe.

Those divestitures are...