Can a systemic infection be a cause of pericarditis?

Yes. It can... But there are many other causes (drugs, cancer, autoimmune disease), so your physicians should keep thinking of other things if you or your loved ones don't get better.
Yes. Yes, indeedy. A systemic viral infection can cause viral pericarditis. Tuberculosis can cause tubercular pericarditis. It is very unusual for bacterial sepsis to cause bacterial pericarditis and i've never seen a case. But it can surely cause endocarditis.