MEG-preprocessing

If the artifact is clearly observable on at least one MEG channel, you could try to run the heartbeat detection on this channel, or mark cardiac events manually, and then run SSP:
https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsDetect
https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsSsp

When running ICA, I am not sure how many components should be set. When I set it to 300, the ICA algorithm cannot converge. Do you have any suggestions for setting the number of the components ?

Unfortunately, I don't have any advice to give regarding the number of components to use.
Have you tried leaving this parameter to zero? (this passes all the recordings to the ICA instead of performing a SVD-based dimension reduction first)
If the recordings was processed with MaxFilter first, the recordings probably have a rank ~64, instead of 306 (lots of dimensions of the data are removed), so you could maybe try with much lower numbers of components?

From the tutorial you released, I learned that MNE-Python is very suitable for MEG preprocessing.

Calling the MNE-Python ICA from Brainstorm is part of our planned developments, but I can't tell you when this is going to be implemented.
If you are a good Matlab and Python coder, you could try writing a new process similar to process_mne_maxwell.m / process_mne_maxwell_py.m

https://neuroimage.usc.edu/brainstorm/Tutorials/TutUserProcess