If the alternative is losing a friend forever, just put up with them.

Literal

Friend [object-を] forever [adverb-に] lose [rather than-くらいならば] that friend [about-のことを] endure-[imperative-なさい].

~くらいなら(ば) frames the worse outcome (永遠に失う, 'lose forever') as a hypothetical to be avoided, motivating the lesser-evil alternative (我慢する, 'endure'). 我慢する is a core emotional vocabulary word for tolerating discomfort without complaint.