Your way is correct.
About your doubt it's important to see the two points on the streamline where you want to apply the Bernoulli Equation. Taking point just inside and just outside the the pipe will matter a lot.
$P_1=0 $ when the second point you choose the point outside the pipe ,which is open to vacuum so pressure is zero. Whereas if you choose a point just inside the pipe at the bottom of the tank the pressure is $P_1=P_0+\rho g h$ .Also this case will give us the velocity of water at the bottom of tank and not the velocity of water leaving the pipe .
Also pressure is a scalar and can be seen as $$P=\dfrac{\vec F.\vec A}{|\vec A|^2}$$ Where area vector is a vector pointing perpendicular to the arwa of the surface and $|A|$=area of surface
If we assume continuity, infinite speed of sound, no viscosity, and laminar flow, then the key is in Bernoulli's equation. In general the pressure variation is very complicated, but to get some ideas how it works we can consider the pressure variation a very simple system that can be calculated analytically.
I came up with this simple system:
![enter image description here](https://i.stack.imgur.com/ttBb7.png)
Let's say somewhere in the water far from the surfaces, suddenly a cavitation bubble of radius $R$ with pressure $P_0-\Delta P$ is produced. Where $P_0$ is the atmospheric pressure, let's assume that the scale of the system we are playing with is small enough that the pressure of undisturbed water anywhere is equal to the atmospheric pressure. Because of the pressure drop, water will start moving radially to fill the bubble as shown in the picture. If the flow is continue and laminar then we have the following flux relation
$v 4\pi r^2= constant$
$v=\frac{C}{r^2}$..........................................(1)
Now Bernoulli's equation gives
$P_0=P(r)+\frac{1}{2}\rho v^2=P(r)+\frac{1}{2}\rho \frac{C^2}{r^4}$
Because $v=0$ at a point far from the bubble. Boundary condition at $r=R$ gives
$P_0=(P_0-\Delta P)+\frac{1}{2}\rho \frac{C^2}{R^4}$
Eliminating $C$ and $\rho$ we get
$P(r)=P_0+\Delta P \frac{R^4}{r^4}$
As expected $r\rightarrow \infty$, $P(r)\rightarrow P_0$. Thus the pressure change fades away as we go farther from the source of disturbance.
In a more general case where the above assumptions still hold, the velocity profile of the flow equivalent to our eq.(1) is quite complicated. Eq. (1) can be replaced with a general flux equation which holds along a streamline
$vA=constant$..................................(2)
Where $A$ is the cross sectional area of a streamline portion. A typical flow's streamlines caused by a moving object look like this
![enter image description here](https://i.stack.imgur.com/xTZ5l.jpg)
We can view eq.(2) as an equation that holds in the moving object's frame. As we can see in the picture above, initially the streamlines are uniformly separated. Let's denote the cross sectional area of each slice of stream line portion as $A_0$, from here we know that if the cross sectional area of a stream line portion equals to $A_0$ then its pressure is unchanged or $P_0$. We can see that the streamlines near the object are denser, which means that their cross sectional area are smaller than $A_0$. Thus from eq.(2) we realize that the water is moving faster there, and Bernoulli's equation says that the pressure there is lower than $P_0$. As we move perpendicularly to the flow, away from the moving object the streamlines' cross sectional area get more and more similar to that of undisturbed ones and so does the pressure there. Therefore it can explain how the pressure disturbance decreases over distance from the source.
Best Answer
The pressure at a particular depth, $h$, is $h\rho g$.
Force on a rectangular strip of infinitesimal height $\text dh$ and width $w$ is $h\rho g\text dhw$ which is when integrated for the entire surface becomes $\frac{1}{2}\rho gh^2w$.
Similarly for other sides.