This expression indicates the completion of an action represented by V. It can also indicate that one does something against his/her will or by mistake. When the verb in the te-form is non-volitional(e.g., 忘れる[forget], まよう[be lost; lose one's way], こわれる[be broken], ぬすまれる[be stolen], it expresses the speaker's regret for what has happened or concern for what will happen.
論文を全部書いてしまいました。
I finished writing my thesis.
あしたこの本を読んでしまうつもりです。
I plan to finish reading this book tomorrow.
忘れ物をしてしまいました。
I forgot to bring something [and regret my carelessness].
道にまよってしまいました。
I lost my way [and had a hard time].