If I'm talking about the past where I was sure exactly that I will do something, can I use two tenses - past and future in one sentence?
I knew I will go through it all.
According to the rule of the sequence of tenses there should be 'would' instead of 'will'.
The sentence is not correct grammatically. You should use would which is the past of will. You use would If you refer to future time from the point view of the past. So the correct sentence is:
I knew I would go through it all.
From the perspective of looking back in time
I knew I would go through it all
In the present
I know I will go through it all
However, your original sentence
I knew I will go through it all
sounds like you are trying to say
At the time, I thought to myself, "I will go through it all!"
but your original sentence is not quite correct
I knew I would have to go through it all
would be better.