This is a great learning experience on so many levels.
First, part of your job is to learn to anticipate these issues. If you go to blackout from a bright scene, you should know that the actors are gonna have trouble getting off - you need to remember that your cast has just been blinded by stage lights and can't see. Does this mean glowtape, running lights, your ASM backstage with a flashlight given them something to point towards? And common practice is to have your ASM (or, if you are lucky enough, both ASM and the other side of the stage crew) give you a clear. If it takes a ridiculously long time to get that "clear", you know there is an issue to solve which it is probably not the actors' fault. Side note: Get used to the fact that you usually will not see things that happen in the black and that you will need to learn to trust your on deck folks with headsets to let you know when your show is ready to move on.
Second, actors and crew need to feel reassured that if there is a problem, they can come to you as the SM and it will be dealt with (whether by you or others is immaterial) with no editorializing or attitude. The rule of thumb is to say YES to everything. Period. No other conversation is relevant, unless you need clarification of the problem. If you have to compromise that "yes", you can come back at a later time with alternatives and reasons, but initially your answer is yes or thank you.
Third, just as being friends doesn't mean they get special treatment, it also means that you can't have different expectations than you would from any other actor. If you wouldn't have lost your temper with another actor, then you should not have lost your temper with this one. More, your friend is coming to you AS A STAGE MANAGER because he assume you (as a friend) will understand the challenge and (as SM) can solve it.
Fourth, your being upset and frustrated - regardless of how your tech went and its challenges - is something you do not ever, EVER express to, or in front of, your actors (or team). If you and your ASM want to bitch after everyone is gone and in private, great. Otherwise, you need to take a deep breath and learn how not to allow your feelings affect your actions in any way. I think maybe part of the issue was your frustration with yourself and the tech - you say it was a rough night. You have to find a way to either set it aside or get that out of your system without allowing it to impact anything happening right now - and that includes dealing the actors, the director etc. Your personal feelings, while valid, must remain separate. Frankly, it sounds like your personal frustration bled into this situation, and because you saw a friend and it felt normal and safe (because of your preexisting relationship) you just reacted without thinking to their comments. But when they are actor (or crew or design team) and you are SM, you need to maintain that line and find a way to say yes, thank you, sorry, all with a smile and all with confidence.
Congratulations on learning important lessons that will be vital in your professional life. Experience is the best teacher, and you clearly have a great opportunity to take the next step by using what just happened and trying something different so you can experience the different outcome. Good luck - and break a headset!