Positioning is everything in this fight. Put two party members—ideally your mages or rogues—on the back rocks, and two others, such as warriors and rogues, on the front rock. Keep attacking the Broodmother from range with your back-line mages and rogues while your front-line warriors press in; she'll mostly just spit at you.
When she screams, send everyone back onto the rocks. This keeps her tentacles from reaching you. While you're safe on the rocks, first take out the darkspawn, then the tentacles. Repeat this each of the three times she does it.
One important tip: if you're running low, don't waste your poultices and lyrium here, because a tougher fight lies ahead. During my playthrough I had five poultices and three lyrium and burned through all of them in this battle—leaving me with just two poultices and no lyrium for the harder encounter that followed. Save your supplies if you can.