I am currently a third year undergraduate at a good university studying computer science. I am planning to apply to top graduate schools when I finish my undergrad and I need a bit of advice.
In the first two and half (5 semesters) of my studies, I took the most challenging CS/Math courses in my university and did very well in them (GPA 4.11/4.30). I also joined two research groups and have 2 publications where I am the first author, published in reputable journals. I also have a very good relationship with my 2 research advisors.
Now in my sixth semester, I decided to go on an exchange semester and things just started crumbling. First of all, I couldn't integrate well in the culture and I was left very lonely with no new friends in the area. My Girlfriend of 5 years broke up with me, my mother got into a car accident which affected her health, and I started taking depression medication due to that. I also gained a lot of weight which lead to some health problems. Needless to say, this term is coming to an end and I can't wait to leave this place. I am going to probably fail 2/4 courses, and in the remaining ones, I will barely pass. I am expecting a 2.0 GPA at best.
Now I know this won't go unnoticed by graduate school admissions. I am just wondering what steps can I take as of now to document all of this so that I can justify the poor performance in the exchange semester during my graduate application?