You declare the Capital Gain in the Capital Gain section and also in the foreign section of the tax return. In addition, you claim Foreign Tax Credit Relief in the foreign section and enter the amount of Foreign Tax Credit Relief due at the start of the foreign section.
Have a look at the guidance for SA106 and SA108. Although, both sets of guidance are set out for the paper tax return, the guidance still applies to the online return.
Capital Gains Summary notes
Self Assessment tax return forms