- Is there someone you know going for surgery?
- Are you troubled?
- Is it a life and death situation?
This is how I would pray for that person.
Dear Lord Jesus,
You have said in your Word (Bible) that if I call upon You, You will answer me and You will tell me great and mighty things, which I do not know. (Jer. 33:3 NASB).
Lord be with … (name of surgeon) as he performs the operation on … (name of patient). Please guide his fingers and hands, give him your wisdom as to how to operate. Be with the nurses and others who assist him in surgery.
Lord, … (name of patient) life is in your hands. Lord, I pray that … (name of patient) will not die but live to glorify Your name.
Lord Jesus, I commit … (name of patient) into your hands.
Surround him/her with your holy angels to keep watch over him/her. In You I have faith and trust.
In Jesus Almighty name.
amen.
Please note that this is not a formula for prayer but rather a simple prayer from the heart with child-like faith and trust. A heart that is right toward God is more important than perfect words. Lord Jesus works through people who are willing not based on our ability or capability but being available to pray with people at the point of need.
mariaonprayer.com
The gemara says (Brachos 60a, on the bottom):
אמר רב אחא הנכנס להקיז דם אומר יהי רצון מלפניך יי’ אלקי שיהא עסק זה לי לרפואה ותרפאני כי אל רופא נאמן אתה ורפואתך אמת לפי שאין דרכן של בני אדם לרפאות אלא שנהגו
Rav Acha said that someone who goes for bloodletting should say “May it be Your Will, Hashem my God, that this practice should be a healing, and I should be healed; for You are a trustworthy Healer and your healing is true,” because people don’t get healed by themselves (they need God to heal them).
( free translation )
This is brought down by the Rambam, Hilchot Berachot 10:21 (as well as Shulchan Aruch, Orach Chaim 230:4, who writes pretty much exactly the same wording as the Rambam). Here is what the Rambam says:
הַנִּכְנָס לְהַקִּיז דָּם אוֹמֵר יְהִי רָצוֹן מִלְּפָנֶיךָ יְיָ’ אֱלֹהַי שֶׁיְּהֵא עֵסֶק זֶה לִי לִרְפוּאָה כִּי רוֹפֵא חִנָּם אָתָּה. וּכְשֶׁיֵּצֵא אוֹמֵר בָּרוּךְ אַתָּה יְיָ’ רוֹפֵא חוֹלִים
One who goes for bloodletting should say “May it be Your Will, Hashem my God, that this practice should be a healing for me, because you are a free Doctor.” When he is finished, he should say “Blessed are You, O God, Healer of the sick.”
( free translation )
I’ve seen some cite the above Shulchan Aruch to require saying this before taking any medicine1 (I do this without using שם השם, when I remember to), even though he only said it regarding bloodletting. I would argue that bloodletting is close enough to surgery so that the same prayer can be used.
1Some have even made this into a card to hand out, as mentioned in one of the comments to the question.
judaism.stackexchange.com