to finish (completely)
This pattern indicates that an action is completed, often with a sense of regret or finality.
Examples
ミスをしてしまったので、すぐに修正します。
I made a mistake, so I will correct it immediately.
資材が足りなくなってしまった。
We have run out of materials.
作業が終わってしまったら、片付けをしないと。
Once the work is finished, we need to clean up.
Quick check
ミスをし___しまったので、すぐに修正します。