She tried to kill herself.

Literal

She [topic-は] commit-suicide-let's [quotative-と] did.

The bare-verb pattern 自殺しようとする treats 自殺 as a suru-verb (自殺する) directly, without an explicit を. The alternative is to keep を and use 自殺をする — both are perfectly natural Japanese; the bare-verb form (~しようとした) is marginally more compact and arguably the slightly more common framing in modern writing. Same volitional + とする structure, expressing an attempt that didn't reach completion.