Capital Gains earned through Stocks and Dividends while living Outside US

Hi,

 

I had traveled out of US at the end of 2018 and stayed outside US for the whole 2019 due to Visa issues but meanwhile my spouse worked in US through 2019. I earned Capital Gains through stock and along with Interest and Dividends. We are planning to file taxes for my Spouse through Turbotax Premier. But my question is, Can I file along with her jointly (MFJ) and show my Capital Gains as my income in our Tax  return and pay any taxes I owe to US. Please advise how to proceed.