Can you do a blood test to check for chemical imbalance?

No single test. There is no single test for "chemical imbalance". Tests are available for many chemicals and the choice of test is usually dictated by the clinical presentation.