You probably can't.
You violated your girlfriend's trust, repeatedly, over a period of time. It sounds as though you plan to blame this on a bout of depression. Your written goal is to rebuild trust with your girlfriend while (from her perspective) potentially re-enacting that violation, requiring her to trust you in the exact way you showed that trust was not justified in the first place, without taking much (if any) responsibility for what happened, and without demonstrating that it won't happen again. That's a tall order.
Some of the goals you listed conflict with one another, and all of them seem difficult in your current situation. Communicating with your girlfriend about how she feels, and what you can do to reassure her, will be critical for accomplishing any of them. Let's take them in turn, though in a different order than used in the OP:
1. Convince my girlfriend that all of that is past now. Explain that the reason I did those bad things was not that friend herself, but the whole situation I was in.
I'm grouping those together because they sound like two elements of the same goal to me. If I have misinterpreted, please let me know.
But here's the problem: this sounds like an excuse of convenience (even though it is plausible as an actual explanation). This rough period, presumably, came without much warning and no obvious way to "fix" it. This is something which you cannot guarantee will not happen again, without warning or apparent cause. And if it did happen again, would that not "pre-justify" more behavior your girlfriend would not like? What mechanisms might constrain your behavior so that your girlfriend can be comfortable that all of that is "in the past"?
Saying "it's in the past" tends to be deployed as a part of "don't bother me about it any more" and "please don't use what you know I've done to assess what I might do in the future, in order to suit my convenience". That may not be the case for you, but your girlfriend might still hear it that way. Making a promise that you can't keep won't help your case either.
You made a mistake. It is not reasonable to expect your girlfriend to just shrug and ignore that, based only on trust in you which you have already broken. It's for you to demonstrate to her that you are committed to the relationship and that the mistake won't happen again. It's not her responsibility to just believe you because you declare that. How you do that will depend on your girlfriend and her feelings, which I can't estimate. So you'll have to talk to her about how she thinks she might be able to move past these problems.
2. Rebuild your girlfriend's trust in you.
Extremely difficult. Even with all of (1) in mind, you have a problem: by placing any portion of the responsibility for kissing your friend on depression (or any related issues), regardless of how accurate this may be, all other bad behavior needs to be addressed explicitly as also being due to the depression or for a distinct, separate cause.
"I was depressed and drunk, and acted out without thinking" sounds like a plausible description of why the initial kiss may have happened. It's an absolutely terrible explanation for why you repeatedly lied to your girlfriend in order to secretly meet with the friend you kissed. If you try to use the depression/alcohol to describe all of the bad behavior my immediate reaction would be that you are reaching for an excuse in order to avoid responsibility for your actions as well as for repairing the relationship. Especially if you want me to believe that all the negative things can be abandoned in "the past".
How, specifically, you go about rebuilding trust with your girlfriend will depend almost entirely on her feelings about you and your actions. You should be prepared for it to involve her subjecting you to more scrutiny, and for you to have to invest more in your relationship than you might usually.
Importantly, you will almost certainly have to deal with rebuilding trust before you are able to see this friend freely again (at least, without your girlfriend being there too). As in (1), above, you are poorly positioned to promise that you'll be totally faithful, indefinitely. As above, talk to your girlfriend about how she feels and what she needs.
3. Being able to meet this friend freely.
This should probably be the last of these goals that you pursue, and even then you'll have to be careful about it. Your past behavior suggests that you value being faithful to your girlfriend less than other things. Even if this impression is wrong, it's probably not reasonable to expect your girlfriend to feel differently. Repairing your relationship will require demonstrating that it's more important to you than recent events might make it seem, and trying to restore your activities with this friend before rebuilding trust seriously undercuts that.
Your pitch, as presented here, is that you only did what you did because of some external issue that is difficult to observe, impossible to predict, (apparently) absolves you of a lot (if not all) of the responsibility for what happened, and that this external issue will never come up again. That is... not very persuasive. Even appearing to prioritize seeing this friend freely before absolutely satisfying your girlfriend on (1) and (2) is likely to make accomplishing (1) and (2) harder.
Given that 100% of the problematic behavior here was on your end (regardless of the reason), you should expect to bear more of the burdens that might be required to restore your relationship. If that involves seeing this friend less, at least for a time, that might be a price you have to pay. The alternative is your girlfriend feeling less secure in your relationship. If you can't handle what your girlfriend wants you to do, or feel that it is legitimately unfair, you don't have to do it. But then you are moving away from accomplishing (1) and (2).