In Act V, Scene 1 of Julius Caesar, Cassius asks Brutus what he intends to do if they lose the impending battle with Antony and Octavius.
You are contented to be led in triumph
Thorough the streets of Rome?
To which Brutus replies:
No, Cassius, no. Think not, thou noble Roman,(120)
That ever Brutus will go bound to Rome;
He bears too great a mind. But this same day
Must end that work the ides of March begun.
Evidently both Cassius and Brutus realize that if they were captured alive they would be taken back to Rome, led in triumph down the main thoroughfare, and then executed. Since it was a matter of historical fact, according to Plutarch, that both men committed suicide, Shakespeare had little choice but to have them do so in his play. All four principals came to bad ends. Brutus and Cassius killed themselves. Antony also killed himself in Egypt after being defeated by Octavius. Octavius became an emperor and a god, but he ended up being poisoned by his own wife.
Octavius and his successors, including the notorious Caligula and Nero, are written about in the excellent novel I, Claudius by Robert Graves and its sequel Claudius the God. These books were adapted by BBC to a long television series titled I, Claudius, in which many of Great Britain's finest actors and actresses appeared, including Derek Jacobi as Claudius. This series is available on DVD.