Interpretation of CP violation measurements using charmonium decays, in both the (B) over bar (0) and (B) over bar (0)(s) systems, can be subject to changes due to "penguin" type diagrams. These effects can be investigated using measurements of the Cabibbo-suppressed (B) over bar (0) -> J/psi pi(+)pi-decays. The final state composition of this channel is investigated using a 1.0 fb(-1) sample of data produced in 7 TeV pp collisions at the LHC and collected by the LHCb experiment. A modified Dalitz-plot analysis is performed using both the invariant mass spectra and the decay angular distributions. An improved measurement of the (B) over bar (0) -> J/psi pi(+)pi(-)branching fraction of (3.97 +/- 0.09 +/- 0.11 +/- 0.16) x 10(-5) is reported where the first uncertainty is statistical, the second is systematic, and the third is due to the uncertainty of the branching fraction of the decay B- -> J/psi K- used as a normalization channel. Significant production of f(0)(500) and rho(770) resonances is found in the substructure of the J/psi pi(+)pi(-) final state, and this indicates that they are viable final states for CP violation studies. In contrast evidence for the f(0)(980) resonance is not found. This allows us to establish the first upper limit on the branching fraction product B((B) over bar (0) -> J/psi f(0)(980)) x B(f(0)(980) -> pi(+)pi(-)) < 1.1 x 10(-6), leading to an upper limit on the absolute value of the mixing angle of the f(0)(980) with the f(0)(500) of less than 31 degrees, both at 90% confidence level. DOI: 10.1103/PhysRevD.87.052001