I'm having some trouble understanding what you're asking. It sounds like you have a linear dicarboxylic acid and you are trying to esterify one or both of the acids, but avoid the intramolecular lactonization, is that correct? If so you have a very challenging transformation, particularly if you can form a 5 or 6 membered ring lactone.