Which material to use for filling those gaps?
You can use Great Stuff to fill the gap. It's easy and quick. It might not be the best solution, but it is very cheap. After you use it, then you could joint compute or vinyl spackling to smooth out the joint.