I probably am jumping over a number of easier and more obvious choices, but here are a few ideas. If the frame will fit, you could try heating it in an oven at maybe 160 F for maybe a couple of hours. This can be tough on glues, if there are any in the frame, and maybe on finishes, so be mindful of that. (After seeing America's Test Kitchen's data on oven temperatures, I'd use a thermometer to gauge the temperature). The heat should kill the larvae and eggs, if eggs are present. If it's really small and there's no metal in/on it, maybe a microwave might work. If it's too big for an oven and if you have a sauna or a solar cooker available, that should suffice. Going the other way, freezing it in a deep freeze for maybe a week give or take should kill the larvae. It has to be deep-freeze cold, because they can survive at least mild outdoor freezes. I'm less certain that freezing will take care of existing eggs than will heat, but I'm not sure abou that. Theoretically, you could rig a dry ice box instead of using a freezer, but I doubt that is very practical for you. As with heat, be careful if the frame has any glue in it; some glues can become pretty brittle at those low temperatures.
Now, if thermal treatment is impractical, I think I would try Tim-Bor or a similar borate product or maybe even boric acid, probably by syringe injection of a solution into the holes. Unlike my other proposals, the borate should prevent, or at least help with, reinfestations. "Wood worms" aren't worms, but rather are a beetle larval stage, so it's possible that Bt or a Bt variant, maybe something like Bacillus thuringiensis var. tenebrionis or Bacillus thuringiensis var. san diego, might work. I'm not acquainted well enough with the beetle species to tell whether/which Bt would work.
Really, I would think that the d-Limonene should work if it's injected into the holes so that it can reach the larvae. I don't believe spraying the frame will do the trick. I'm not sure about Neem products, but I would think they would work also. The go of the chemical application would be to not damage the wood with wetness, although some will be involved. D-Limonene may affect any glues or finishes if it's very strong, so mind that. One old wood worm remedy was to paint linseed oil on the wood, but I doubt if that is practical in your case.
In theory, theory and practice are the same; in practice, they aren't -- lament of the synthetic lifestyle.