You're very close to correct, but I would say there are two issues.
Firstly, consider whether learning is supposed to be a participial adjective or a gerund. In the original sentence, it's a gerund, because it means the act of knowing helps us.
But when you stick that sentence on another sentence, it looks like a participial adjective, but then it doesn't make sense. The participial clause usually applies to the subject of the sentence. Consider "the birds flew by the window, chirping loudly" - clearly, the birds were chirping loudly, not the window. Likewise, the subject of the first sentence is those who don't learn from the past, so if you just stick on a participial clause, it sounds like it applies to those who don't learn, which is not what you want.
Secondly, if you want to make a dependent clause, it should begin with a subordinate conjunction like which, so you were almost correct, but it should be "...previous mistakes, which knowing helps us..."
If you want to make a completely separate independent clause (effectively a separate sentence), it needs a coordinating conjunction like and or but or a semicolon. For example:
"They are doomed to repeat previous mistakes, but knowing previous mistakes helps us..."
or
"They are doomed to repeat previous mistakes; knowing previous mistakes helps us..."
References:
- Clauses and phrases
- Subordinate conjunctions