Student or Learner
Our mistakes belong in the past.
Our mistakes belong to the past.
Would either underlined part work?
Yes, either would work. There is a small difference in meaning, but both are grammatically correct.
If you say your mistakes belong in the past, that suggests that you're saying in the future you should make no more mistakes - going forward there should be no more mistakes.
Saying your mistakes belong to the past suggests that you should not think about your past mistakes in the future.