Under cross-border provisions it may be possible to file for bankruptcy in the UK, but you will need to demonstrate that your centre of business interests is based here rather than in Spain - which may be difficult if all of your debts originate in Spain.
For an informal chat about any financial difficulties, or advice as to the options available, I can be contacted via my website - www.melaniegiles.com