What should I do to maximize my chance at grad school (mathematics)? I'm a second year student who has had a terrible semester. I don't live in a great place this year and I became really unhappy because of it. I'm also involved with too many extra curricular activities and took an extra course (biochemistry) that all together brought my GPA (and motivation) down incredibly. 

I'm positive next semester will go much better, I've taken a step back and analyzed my situation and what I need to do to bring my GPA back up (I might take some summer courses too). Lucky for me, the course I'm doing terribly in isn't a math course that contributes to my major, and the other two courses I anticipate I'll end with a B/B+. 

If anyone has any advice on what else I can do to make my applicant profile look better for grad school, I'd really appreciate it. I'm planning on asking professors to see if they'd be willing to take me in for research, hopefully my stellar math grades will make up for the crap ones I've got this semester. 

Otherwise, I'm hoping to take the Putnam and GRE of course, but if anyone has a similar experience, I'd really appreciate hearing about it. 

Thanks!
If you are a second year student in the US looking to go to a PhD program in math, here is a list of some "standard" things to do:


Take as much math as you can, and excel at it. You should aim to not only have As, but high As, in many upper level classes.
Cultivate relationships with professors for letters of recommendation. This could involve research, but it could also involve class interaction, or attending appropriate seminars, or other ways of interacting with your professors.  
Take the subject math GRE seriously, and study well for it.
Consider applying to REUs for the summer after you junior year. At more selective schools, many of the U.S. applicants will have gone to REUs. At the same time, the value of REUs is highly debated, with some favoring them and others suggesting that other kinds of preparation could be equally valuable, if not more valuable, in their opinion. In any case, you would apply to REUs in the fall or early winter of your junior year. Similarly, you could consider semester-long programs like the Budapest Semesters in Mathematics, the Penn State MASS program, or similar.
Begin researching graduate programs early; you will apply in the fall of your senior year, and the deadlines always seem to approach too fast. 
If there are extracurricular activities you enjoy, continue to participate in them, but avoid getting too busy. 


Other than the standard things, do what you enjoy. If you want to go to a PhD program in math you need a very strong track record in math. But that does not mean you need to be one-dimensional. Many of my friends at graduate school had other hobbies that they took very seriously.