I would consider the behavior at the endpoints. Near $x=0$, $\sin{x} \sim x$, so that convergence of the integral requires that $p<1$. Similarly, near $x=\pi/2$, $\cos{x} \sim (\pi/2)-x$, so that $q<1$ for convergence. Therefore, $p$ and $q$ each must be less than $1$ for convergence.
To begin, the function $(x,y) \mapsto e^{-xy} \sin x$ is not absolutely integrable. It is enough to show this for the region $[0,\infty)^2$.
If it were then we could apply Fubini's theorem to the iterated integrals and conclude
$$\int_0^\infty \int_0^\infty e^{-xy} | \sin x| \, dx \, dy = \int_0^\infty \int_0^\infty e^{-xy} | \sin x| \, dy \, dx $$
However,
$$\int_0^\infty e^{-xy} | \sin x| \, dy= \frac{|\sin x|}{x} $$
and this is neither Lebesgue nor improperly Riemann integrable over $[0,\infty]$.
The question seems to be is the improper Riemann integral $\int_{\mathbb{R}^2} f$ convergent, where $f(x,y) = e^{-xy} \sin x$.
For integrals over $\mathbb{R}$ the definition of an improper integral as $\lim_{a \to -\infty, b \to +\infty}\int_a^b f$ is unambiguous. For multiple integrals the definition of improper integral requires more care. The standard is
$$\tag{*}\int_{\mathbb{R}^2}f = \lim_{n \to \infty}\int_{A_n}f,$$
where $A_n$ is an admissible sequence, that is a sequence of compact Jordan measurable sets such that $A_n \subset A_{n+1}$ for all $n$ and $\cup_{n=1}^\infty A_n = \mathbb{R}^2$.
For the improper integral to be well defined, (*) must hold for any admissible sequence with convergence to a unique value. This has an important consequence:
If $\int_{\mathbb{R}^2} f$ converges as an improper integral in the
sense of (*) then $\int_{\mathbb{R}^2} |f|$ converges.
See here for a proof.
Since $\int_{\mathbb{R}^2} e^{-xy} |\sin x|$ does not converge it follows that the improper integral $\int_{\mathbb{R}^2} e^{-xy} \sin x$ does not converge in the sense of (*). In fact, it can take on different values depending on exactly how the limiting process is defined. This is analogous to the problem with rearrangements of conditionally convergent infinite series. An example is given here.
Best Answer
$f(a, b) =\int_0^{\pi/2}\frac{\mathrm{d}x}{(\sin^ax^2)(\cos^bx)} $.
Around $x=0$, $\dfrac1{\sin^ax^2} \approx \dfrac1{x^{2a}} =x^{-2a} $ and $\dfrac1{\cos^bx} \approx 1 $, so the integral is like $\lim_{r \to 0}\int_r^c x^{-2a}dx =\lim_{r \to 0}\dfrac{x^{-2a+1}}{-2a+1}|_r^c $ and this diverges for $-2a+1 < 0$ or $a > \frac12$.
Similarly, around $x = \pi/2$, $\cos(\pi/2-x) =\sin(x) \approx x$ so so the integral is like $\lim_{r \to 0}\int_r^c x^{-b}dx =\lim_{r \to 0}\dfrac{x^{-b+1}}{-b+1}|_r^c $ and this diverges for $b > 1$.
You can show that the integral converges for $a < \frac12$ and $b < 1$.
For $a=\frac12$ and $b = 1$ the integral behaves like $\lim_{r \to 0}\int_r^c \dfrac{dt}{t} =\lim_{r \to 0}\ln(t)|_r^c $ and this diverges.