to complete/finish (sometimes regrettably)
This structure indicates that an action will be completed, often implying regret or an unintended consequence, in a polite manner.
Examples
お薬を全部飲んでしまいました。
I ended up taking all the medicine.
お茶をこぼしてしまいました。
I spilled the tea.
間違えて書類を捨ててしまった。
I accidentally threw away the documents.
Quick check
お茶をこぼし___しまいました。