I measure a current of about 50mA flowing into the board.
I tried to substitute the battery with a capacitor/supercapacitor (charged at a voltage of about 4V)
only 1sec but I can recharge it. The problem with a battery is that I need a rechargeable battery. Min voltage is 3V
So you need starting voltage of 4V, 50mA discharge and cut-off voltage if 3V.
The capacitance is actually equal to the number of Amps which can be put in, or taken out of a capacitor for a second, before the voltage changes by 1V. For example, if you connect a 1 Farad capacitor to a constant current supply for 1 second, it will charge up by 1V. If you then connected it to a 1A constant current load, it will discharge by 1V. Doubling the capacitance will double the time it takes to for the voltage to change by 1V.
In your case a 50mF (0.05F or 50 000µF) capacitor will be able to supply 50mA for a second before the voltage drops by 1V. To allow for the ESR, tolerance and ageing, you need a slightly larger capacitance than 50mF.
The ESR needs to be as low as possible. The voltage will immediately drop by ESR*V as soon as the load is connected. For example, an ESR of 10 Ohm means the cut-off voltage (open circuit) needs to be 3.5V, rather than 3V, so the voltage drop over discharge is now 0.5V and you need C = 0.5/0.05 = 0.1F
Keep the ESR below 2 Ohm and its effect will be negligible.
You say it needs to be 1cmx1cm but how high can it be?