$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
\newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
\newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\ds}[1]{\displaystyle{#1}}
\newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
\newcommand{\ic}{\mathrm{i}}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\mrm}[1]{\mathrm{#1}}
\newcommand{\on}[1]{\operatorname{#1}}
\newcommand{\pars}[1]{\left(\,{#1}\,\right)}
\newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
\newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
\newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
\newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
First step: Multiply numerator and denominator by
$\ds{\sec^{2m + 2n}\pars{\theta} =
\sec^{2m - 1}\pars{\theta}\
\sec^{2n - 1}\pars{\theta}\
\sec^{2}\pars{\theta}}$.
\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{\pi/2}
{\sin^{2m - 1}\pars{\theta}\cos^{2n - 1}\pars{\theta} \over \bracks{a\sin^{2}\pars{\theta} + b\cos^{2}\pars{\theta}}^{m + n}}
\,\dd\theta}
\\[5mm] = &
\int_{0}^{\pi/2}
{\tan^{2m - 1}\pars{\theta} \over
\bracks{a\tan^{2}\pars{\theta} + b}^{m + n}}
\sec^{2}\pars{\theta}\,\dd\theta
\\[5mm] \stackrel{x\ =\ \tan\pars{\theta}}{=}\,\,\,&
\int_{0}^{\infty}{x^{2m - 1} \over
\pars{ax^{2} + b}^{m + n}}\,\dd x
\\[5mm] \stackrel{x^{2}\ \mapsto\ x}{=}\,\,\,&
{1 \over 2}\int_{0}^{\infty}{x^{m - 1} \over
\pars{ax + b}^{m + n}}\,\dd x
\\[5mm] \stackrel{ax/b\ \mapsto\ x}{=}\,\,\,&
{1 \over 2a^{m}b^{n}}\
\underbrace{\int_{0}^{\infty}{x^{m - 1} \over \pars{x + 1}^{m + n}}\,\dd x}_{\ds{\on{B}\pars{m,n}}}
\end{align}
See this link.
Then,
\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{\pi/2}
{\sin^{2m - 1}\pars{\theta}\cos^{2n - 1}\pars{\theta} \over \bracks{a\sin^{2}\pars{\theta} + b\cos^{2}\pars{\theta}}^{m + n}}
\,\dd\theta}
\\[5mm] = &\
\bbx{{1 \over 2a^{m}b^{n}}\,{\Gamma\pars{m}\Gamma\pars{n}
\over \Gamma\pars{m + n}}} \\ &
\end{align}