Hi,
You can find the UK / Spanish tax treaty at:
Spain: tax treaties
You will need to look for the article that covers you source of income.
You can apply to HMRC for a certificate of residence:
How to apply for a certificate of residence to claim tax relief abroad to submit to the Spanish tax authorities, showing that you are Uk resident under article 4 of the tax treaty.
You will need to declare the amount of income and the article that the income relates relates to.
If there is no article, then consider the other income article. You will need to register for self assessment, if you are not already registered and you will need to submit a tax return, declaring the foreign income.
Thank you.