Burping does not invalidate wudoo’ and there is nothing wrong with you burping to release gas and keep your wudoo’. But you should consult doctors to help you get rid of the gas, because Allah has not sent down any disease but He has sent down a cure for it. And do not despair because of what you say about losing focus, for you are being tested and you will be rewarded for your patience, in sha Allah.
If you are praying in congregation, then the fuqaha’ regard it as mustahabb for a person to lift his head when burping, so that he does not bother those who are beside him.
Al-Mardaawi (may Allah have mercy on him) said: The general ruling is that lifting one’s gaze to the sky (when praying) is makrooh. This is our view and that of our companions. And it was said that by merely lifting one’s gaze to the sky, one’s prayer is invalidated. This was mentioned by al-Haawi and others.
Note: an exception is made to that in the case of burping, when one may raise the head. Imam Ahmad, according to one report from him, and others stated: If (a person) burps when he is praying, he should raise his face and look up, so that the smell does not bother those who are around him. Abu Taalib said: If he burps when he is praying, he should lift his head up so that the smell will dissipate; if he does not lift his head, he will annoy the people around him with his smell.
End quote from al-Insaaf, 2/91
If wind comes out of you constantly and without stopping, and it does not stop at a time when there is sufficient time left for you to do wudoo’ and pray, then this is “incontinence of wind”, and the one who is affected by it should do what is done by the woman who is suffering from istihaadah (ongoing, non-menstrual vaginal bleeding) and the one who is suffering from urinary incontinence. He should do wudoo’ when the time for prayer begins, and offer the obligatory prayer and whatever naafil prayers he wants, and it will not matter if he passes wind whilst praying.
If this is the case, do not try too hard to burp; pray as you are and do not worry about wind coming out of you, especially if that will help you against what you are faced with of waswaas and losing focus, as burping is not stopping the wind altogether.
See the answer to question no. 22843
You should beware of waswaas and not pay any attention to it. If you are not sure whether wind has come out of you or not, then think of the basic principle, which is that no wind came out, and do not pay any attention to it. This is the best remedy to dispel waswaas.
See the answer to question no. 13892.
We ask Allah to heal you and grant you wellbeing.
And Allah knows best.