Beside of visiting the lectures and doing the homework carefully, students can profit greatly from selfstudying outside of university. Not only the concepts will be explained different from how the professors' teaching, therefore giving students new point of view; the literatures also regularly reveal how the learning subject can be applied in advanced courses, hence play a motivational role.
Followings are some of literature recommendation, which I heaviliy utilised for my switch from an practical engineering studying field to a more theoretical Computer Science. After struggling a lots with finding books on the right diffculty spectrum, I constructed the following most important criteria a trustworthy textbook has to meet:

Beginner friendly: theoretical computer science can sometimes be very hard, beginners will only face more challenges when a proof skips many intermediate steps to the final conclusion. Therefore I prefer authors who do not make any assumption of readers' background.

Proof oriented: while concrete examples are a important, practicing to construct proofs are the only way to learn and understand concepts effectively.

Includes solutions or solutions can be found online: this is one point where people’s opinions split. My rule of thumb is to try to solve the exercises myself inside a certain timeframe, after stucking on a step long enough, I take a look at the solution for hint. It would be otherwise very difficult for me to know, if my solution is even correct.
Tutorium Analysis 1 und Lineare Algebra 1  Florian Modler
This book is meant to accompany math major students for one semester, the theorems and corresponding proofs are essential and therefore perfect for selfstudying. However, no exercises are included so I could not rely only on this book.
Analysis 1 / Übungsbuch zur Analysis 1  Otto Forster
This bundle is the opposite of Florian Modler’s lecture, consists mostly of exercises with solutions. A perfect book to prepare for the final exam.
Lineare Algebra  Eine Einführung in die Wissenschaft der Vektoren, Abbildungen und Matrizen  Albrecht Beutelspacher
Usually when it comes to Linear Algebra, the beginners would get recommended Gilbert Strang’s “Introduction to linear algebra”. I personally find Strang too talkative and his approach not very rigorous enough for university’s math level. Beutelspacher on the other hand gives the students a very gentle introduction for proofheavy linear algebra with vector space as main focus, which I find easy enough for learning on myself, but still challenging enough to struggle on the usual basis.
Lectures on probability theory and mathematical statistics  Marco Taboga
A very detailed book on probability theory and statistics. When it comes to probability for computer science, this one is the best I have every tried (and I have tried many, before). Taboga leaves no stone of probability unturned, important concepts are explained very well and understandable. Students will get a foundation of set arithmetric, random variable, characteristics values, probability distributions up to statistical inference, hypothesis test and variance analysis.
Statistik der Weg zur Datenanalyse  Ludwig Fahrmeier
This one is a rather practical book on statistics with a focus on connecting theoretical concepts and applying them for problem solving. A probability theory course may gave me the theoretical foundation, but it was this book which made me fall in love with statistics and data driven thinking.