to prepare yourself mentally to do something difficult
Usage notes: This phrase comes from the Bible, where girding up your loins meant to tie up long, loose clothes so that they were more practical when you were working or travelling.
Both sides are presently girding their loins for the legal battles that lie ahead.