You should only use “My friend and I…” when they are the nominative, subject of the verb. For instance, “My friend and I went shopping”.
If my friend and I are the object (accusative) or indirect objects (dative) of the verb, then “me” is the correct form, not “I”. For instance “The waiter gave the bill to me and my friend”, where the bill is the direct object and “to me and my friend” are the indirect objects.
As a pp has said, when it comes to prepositions such as by me, for me, with me (the ablative in a case language), then again, it should be in the form of “me”, not “I”.
In French, I was taught stylistically, they prefer a normal sentence to be arranged subject verb object, then phrases of increasing length - so it’s preferable to say “The waiter gave the bill to me and my friend” to “The waiter gave the bill to my friend and me”, unless for some reason, “me”was put at the end of the sentence for emphasis. I tend to do the same in English, out of habit.
Myself is reflexive as a pp said, although I think, we could say in a speech
”I did it myself” to emphasise I did it personally, rather than delegating it to someone else.
We were always taught, the point of grammar is to make the meaning clear; but we are more forgiving of errors in speech, whereas it is better to use grammar properly in writing.