If you're on Bedrock and can't hold shovels in your offhand (Shield slot), there's not a great solution, but mending is still useful on your shovel. The key fact is that whatever tool you're holding gets the mending at the time you pick up the EXP orbs, NOT whatever tool you used to complete the job.
When you mine EXP granting ores, like coal, redstone, and lapis, stand at the greatest reachable distance you can and mine them with your pickaxe. Quickly switch to your shovel so that when you collect the orbs, you're holding the shovel.
If you have a mob farm, say from a skeleton spawner, you can slay the mob with the sword, and quickly switch to the shovel before collecting the orbs. If you have a fully automated EXP farm, you can simply stand at it collecting orbs while holding the shovel.
Additionally, any other activity that yields orbs works, too. Collect smelted items, breed mobs, trade with villagers while holding the shovel to collect the EXP orbs and it'll mend your shovel.
These things are a hassle, but mending is still worth it on your diamond+ shovel, IMO.