I'm with Genghis & A&C on this.
I always check the radio failure procedures for where I am going before I set off. This may sound very boring, and it is. It is also more difficult than might first seem, because often the rt failure procedures for non IFR traffic aren't made very clear. I remember starting a discussion here 18 months ago, about what was a "suitable aerodrome", as this is where I was supposed to divert to in case of a radio failure outside controlled airspace.
A&C is spot on when he says "fly the airplane". It is VERY easy to get fixated on a non-life threatening problem, to the exclusion of everything else that is happening. Keep asking yourself if you are getting fixated on the problem, and ignoring more important responsibilities.
Finally, other things that you might consider. Is the alternator still providing power? Perhaps you've had a complete electrical failure, not just a radio failure. If this is the case, try turning off all electrics apart from the radio and the transponder. If you still don't have enough power then try recycling the alternator.
dp