The usual approach is to measure the CFD's contribution to total portfolio returns.
So if you put on:
a long that cost you 1000 (or was marked-to-market as such at period-end)
a long that made you 1200
a short that made you 800
a short that cost you 800
=> Net P/L = +200
So if you had 10,000 capital at period-start, you'd have made a 2% return. From individual position returns/contributions of -10%, +12%, +8% and -8% respectively.
The mark-to-market values are assets/liabilities owed between you and your broker/counterparty, irrespective of the absence of any cash transfers. Essentially, they are just a form of debt.
Closed positions which do end up with a cash transfer become income/expenditure items, that generate an identical asset/liability debit/credit position to an open position. All that happens when a position is closed is that it morphs from a debt asset/liability to a cash one.
Now, the complication can arise whereby a portfolio has A cash, B investments, C CFD longs and D CFD shorts.
Its gross market exposure will obviously be B + C + D
Its net market exposure will obviously be B + C - D
But its capital position will just be A + B. That is its liability to you, your asset from them. Recall that a firm's equity is its liability, its debt to the shareholders. The cash and investments that the portfolio holds are owed back to you = your asset, the portfolio's liability (to you).
The asset and liability position of any CFDs (long or short) is no different than you buying a house with a mortgage. The portfolio has an asset/liability position with a third party that is not you. That "mortgage" just happens to be a derivative position on the Apple share price (or whatever), rather than a fixed interest debt position. Your asset position from the portfolio/ its liability to you is de facto geared/levered to the portfolio's positions with the broker in exactly the same way your house might be levered by a bank mortgage.
So your balance sheet has:
Assets/Debits to my portfolio = A+B
Liabilities/Credits to my future consumption (or kid's inheritance) = A+B
The portfolio's balance sheet has:
Asset: cash position = A
Asset: investments = B
Asset: unrealised profits on CFDs (long and short)
Liability: unrealised losses on CFDs (long and short)
Liability to you = A + B + Profits - Losses
The realisation of any of these gains or losses will obviously change the cash position by the same as the removal of the unrealised obligation, so the net asset/liability will not change. Which is no different to eg the effect of buying or selling an investment on the cash position.
The critical point is that changing the portfolio's gross/net risk via CFDs doesn't have an impact on the balance sheet until these positions start to generate gains or losses. Just like changing my mortgage doesn't change my wealth until house prices (or interest rates) change.
Seen thus, my return from the CFDs really is the degree to which the gains or losses they generate change the pre-existing liability of the portfolio to me. Which is: profit or (loss) of CFD position / ex-ante liability. Which is CFD P&L / (cash + investments).