Praise be to Allah.He should go to the restroom and tend to the call of nature even if this means he will miss the jama'at (congregational prayer). The evidence: Abullah Bin Arqam said, "The Messenger of Allah (peace be upon him) said: 'If one of you needed to go to the restroom and the salaat starts, he should start with the restroom.' "1
From the book What Should You Do in the Following Situations... ?
1 Abu Dawood 88 and Sahih al-Jaami' 373.