PartitHead[expr, h] returns a list {ex1, h[ex2]} with ex1 free of expressions with head h, and h[ex2] having head h.
PartitHead[expr, h]
{ex1, h[ex2]}
ex1
h
h[ex2]
Overview, FCSplit.