first of all, post breakup depression isn't necessarily "depression" in the clinical sense. in medical terms it would be what's called an "adjustment disorder," which is just what it sounds like, a disturbance in your mental health due to adjusting to a new life circumstance or a period of stress. pharmaceutical aid can help but is often not necessary. a brief course of psychotherapy is probably a better bet, so is going to the gym, getting active socially again, all that sort of stuff that's cliché by now to say but really helps and is not an easy thing to motivate yourself to do but is worth it
opiates will, indeed, help; until they stop to help, whereupon you'll realize that increasing the dose will make them help again; whereupon you'll get your first withdrawal symptoms; whereupon you'll be an addict just like everyone else. this is more or less inevitable. you are explicitly saying that you want to use opiates as an escape. this is already a bad sign.
importantly,
euphoriant ≠ anti-depressant
anti-depressants are supposed to put you at a baseline state. euphoriants get you high, which is an unnatural and imbalanced state, and one from which you will eventually have to return, almost inevitably worse for the wear, especially when you're using the drug as an escape.
the same could be said about just about any of the recreational drugs*. amphetamines definitely will make depression go away for a while, but the same story, and the crash from them can have even people without underlying depression feeling even suicidal.
assuming you are getting your drugs from the black market rather than a doctor, this leaves you open to all the worries of supply & demand not to mention it is an expensive habit (my last run with dope about 6 months cost about $20k all told)
do not think this will work without escalating the dose
all of the effects that you're looking for will fade away. you are not treating depression, you are merely putting your mind in a place where it doesn't give a fuck and is just looking inward at how nice it is to be high. this is a good escape for awhile but you're far from the first person to say that they're pretty sure they can control themselves and then go full on degenerate or in the very least wind up with a habit and having to go through withdrawal. ask any dope fiend, BTW, kicking dope isn't really that hard, but staying off is, one of the particular reasons for this is post-acute withdrawal syndrome (PAWS) which includes depression & anxiety and lasts much, much longer than the initial withdrawal with the diarrhea and the gooseflesh and all the physical and mental miseries, but that's over in less than a week; the other shit can last for years
you are talking about a long term commitment whether you think you are or not. if you're dealing with post-breakup depression, imagine opiates as being another fling, but one that almost always leads to a love affair that ends badly. you'll put yourself through the same shit again just in a different way, in some sense; this is of course a metaphor but a very true one. addiction is a pathological relationship, basically, but it's with a drug.
This post or any of my communications do not constitute professional advice nor do they establish a professional relationship of any kind; I make no claim to any professional credentials; in person consultation is essential for any medical, psychological, substance-related or harm reduction decisions. While peer support an advice can be helpful, any content posted online, regardless of it's source, cannot, by it's very nature, substitute for an in-person relationship with a clinician who has had the opportunity to take your history in the larger context and provide professional advice with all these factors, and others, taken into account.
_________________
*with the possible exception of ketamine, used clinically (where it is given in treatments spaced out over time, in controlled doses and settings, and does seem to work well for many people; this is not recreational use; people with depression often get into ketamine and start doing it every day as an escape, this is really bad news and although not an addiction on par with heroin should be taken seriously as a largely psychological dependence that is very bad for your mental health) studies are being done with buprenorphine for depression and the only reason I could possibly see this working (besides anecdote, which includes to some degree my personal experience, although it wears off after a time) is the very particular pharmacology of this drug. this is a ways off though. and neither is something that is appropriate to undertake except under medical supervision.