Unless you have really expensive and good components, you are financially better off buying a new bike and maybe sell the old components.
if you don't get the very same frame, your BB may not fit, and with that not the crank (at least possibly). Derailleur hanger may not fit as well. You may also want to upgrade the drivetrain depending on what you have.
And are your components really great if they came with a bike that frame breaks?