I personally find sanding back waterbased varnish and baby talc subject to clogging even using stearated paper.
If you had a whole batch I guess you could do the same with cheap oilbased paint if you have some kicking around going spare, better seal of the edges and less prone to clogging.
I've used plaster of paris before now as a poor mans version of plasterboard jointing compound with a dash of PVA in it (and I had some spare after resetting the tiling in an iron fireplace for a customer) but jointing compound (Spackle in the USA) would also sand back to a lovely finish and takes paint well.
Alternatively I recently got put onto a powdered filler that is extremely good, will not pull out of even the smallest pores as you get in MDF, sands easily and takes paint extremely well:
https://www.screwfix.com/p/toupret-powd ... lsrc=aw.ds
It's BRILLIANT stuff - the 5 star rating is entirely justified - however I would be wary of using it under gloss paint.
Although the above options are water based they dry so quick there is little chance of the MDF edges swelling (assuming the mix isn't too sloppy), but if you are at all concerned about that, pound shop superglue, the really watery stuff in the plastic bottle pack of three (used to be 4) will seal it but you have to be quick applying it running a spatula over the edge right after running the bead of superglue to spread it out better - clamping the frame in a vice at an angle is advised. (also works for sealing plywood prior to planing a bevel to avoid tear out)
If the picture frames are going to be painted a dark glossy colour (that shows up EVERY blemish like a pinapple) and you need a glass smooth surface - you have options of either 2 part car body filler, a bit harder to sand and be careful to use a sanding block with a 90deg guide to keep it absolutely flat on the edge or you'll have issues with the outer edges and "rolling over" exposing the coarser MDF underneath, or you could try your hand at using Gesso which is the base used for gold leaf; the proper stuff has a hide glue base NOT water and as such won't promote swelling.
Also note that Halfords sell the epoxy body filler in large containers for about £24 compared to screwfix et al who sell only smaller tins for about £10.
If you want it a bit runnier, making it easier to apply in a thinner coat (with suitable spreader) buy a can of fibreglass resin at the same time as the two are compatible and mix it about 60% filler 40% resin - it'll go super gooey and liquid, almost pourable and will spread really well and evenly with less sanding required.
DON'T GO MAD WITH THE ACTIVATOR - you can get away with much less than the "1 pea sized activator to golf ball sized filler" commonly stated ratio - it takes longer to set, but not massively longer and gives you more working time so you can mix up more and less / no waste going off before you can apply it. I regularly use much less than that especially when the mix is runny as it mixes far better - a tip is NOT to mix up the resin & filler together first but add the activator to the resin, it'll dissolve really quickly into the resin, then mix the resin and filler for a good even mix so it all goes off properly - doing it the other way risks areas of "not gone off" filler with is then a right pig to deal with.
Warning - it WILL STINK - and the smell lingers so don't do it indoors - you might be able to contrive a line and some wire to hang them outside under cover for a day or so to let that dissipate.
Sand to at least 320 grit or even 400 and you'll have a finish that when painted with high gloss paint will be indestinguishable from the smooth face. Then make sure you "flat out" (wet sand) the paint using above mentioned guide block between 2nd and 3rd finish coat with 600 grit or you'll blow through and "roll over" the edges.... again - been there, got the t-shirt).
As you can see I've a bit of experience with this.
hth.