There are various synonyms for the phrase "in agony of doubt". One of the most common and straightforward would be "tormented by uncertainty", which also conveys a sense of mental and emotional distress. Another possible synonym might be "racked with indecision", which highlights the struggle to make a choice or commit to a particular course of action. "Consumed by apprehension" might also be a suitable alternative, emphasizing the feeling of anxiety and fear that often accompanies doubt. Ultimately, the choice of synonym will depend on the exact context and tone of the writing or speech, as well as the intended audience and purpose.