One way is to do this iteratively. You can always start with ABE with function degree=1 and a somewhat large standard deviation for rejection. This will roughly remove the global gradient so you can apply a smaller deviation parameter to better reject nebulas and stars in a subsequent ABE (with higher function degree) or DBE.
If you do the above carefully, you can almost certainly get acceptable results. To get the best and most accurate gradient removal (demanded by mosaic works), you need to take a wider-field image, like 3 to 5 times wider than your main-scope FoV. Run a careful ABE/DBE on that image first. Since it's wide, there should be more nebula-free areas for you to run a robust ABE/DBE. Then you can use that image as a gradient removal reference for your main image. The photometric mosaic script in PI can be used for that purpose and it works quite well.