>>11242683I double majored in math and CS.
If you're doing analysis for the first time, go through Abbott's Understanding Analysis. It's really good as pre-Rudin analysis text that lets you focus on general metric space later. Anyway, the book of proof is free online, and so is "an infinite descent into pure mathematics." You can download how to solve it by polya off libgen. These are good intro proof books. After that, do a linear algebra book like the canoical friedman, axler, etc etc. Then, I'd say you're good for Rudin and your favorite algebra author (I like Artin's style of expositing, but he's sort of old and outdated. There are better books) After that, you should have enough to be able to pick up whatever mathematics you need to learn by yourself.
Theoretical CS uses a lot of what you'd learn in math undergrad casually. Same goes for the other subjects. Pay close attention, even to continuous mathematics. It's all useful, and it all shows up sooner or later. Do Arora-Barak's complexity book, supplement with Oded, and read Flajolet-Sedgewick's Algorithms / Analytic combinatorics sequence. These are all good books to start with once you have the basics down